Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
6.6
-
None
-
81b15adba (dev)
Description
From LLVM 17 on, the clang-tidy tool comes with a "misc-include-cleaner" check which, among other things, checks for missing header files. Unfortunately, it triggers in basically every Qt application, because the canonical headers do not provide the corresponding symbols directly.
As far as I understand, this could be fixed by annotating the header; e.g. for QString:
#include "qstring.h" // IWYU pragma: export
While I'm not generally a fan of amending code purely to make tools happy, the cost/benefit ratio seems pretty good in this case.
Opinions?
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-30441 Windows: Lots of false clang-tidy warnings for project with custom .clang-tidy
- Closed
- relates to
-
QTBUG-124159 IWYU incorrect header suggestions
- Reported
-
QTBUG-45489 iwyu mapping file for Qt
- Closed