Add IWYU pragma comments to internal headers
Author: palapapaCreated Aug 19, 2026Updated Aug 19, 2026
Labelsenhancement
Describe the problem you are trying to solve.
If you use clangd with its include cleaner, it asks you to include headers that directly define the symbols you use, instead of headers that include other headers that define the symbols you use.
This means that if I want to use flecs::world by including flecs.h, clangd will ask me to include flecs/addons/cpp/world.hpp instead. Of course, that doesn't work because world.hpp depends on other headers and should not be included directly.
Describe the solution you'd like
Comments like // IWYU pragma: private, include "flecs.h" need to be added to flecs/addons/cpp/world.hpp and other internal headers to prevent this false positive.
Source: SanderMertens/flecs