-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
I’m setting up Clang module maps for Qt, and hitting a bit of a sharp corner in that umbrella “.” will recurse into every subdirectory. Same with umbrella header “foo.h” , but resulting in a tonne of -Wincomplete-umbrella warnings.
Our setup in Qt is that our per-module include dirs have a flat list of public API headers in say QtCore, and then we have QtCore/6.11.0/QtCore/ with (semi) private headers of various sorts.
umbrella “.” results in including all these of these private headers, which fails the module build due to unexpected include paths:
/Users/torarne/build/qt/6.x/qtbase/lib/QtCore.framework/./Versions/A/Headers/6.11.0/QtCore/private/qabstractanimation_p.h:22:10: fatal error:
'private/qobject_p.h' file not found
22 | #include <private/qobject_p.h>
| ^~~~~~~~~~~~~~~~~~~~~
main.mm:3:9: fatal error: could not build module 'QtCore'
For framework builds on Apple platforms we could perhaps put the private headers in a PrivateHeaders directory inside the framework, but for non-framework builds on Apple platforms, or non-Apple platforms that would not work.
I tried exclude header “6.11.0/*" but doesn’t look like globs/wildcards can be used in modules.
Would be nice if there was some way to limit the wildcard inclusion, or to allow specifying wildcard exclusions. Thanks!