vsapsai added a comment. In D112915#3106472 <https://reviews.llvm.org/D112915#3106472>, @jansvoboda11 wrote:
> That's interesting. I think `HeaderFileInfo::isImport` should definitely be > tracked in the preprocessor, not in `HeaderFileInfo`. The fact that the > header was `#import`ed is not an intrinsic property of the file itself, but > rather a preprocessor state. Can you think of other fields that don't really > belong to `HeaderFileInfo`? After checking `HeaderFileInfo`, looks like `isImport` is the only other field that should be tracked in the preprocessor. I had in mind a case where a hidden submodule imports a file with x-macros and then a visible submodule includes this header twice with different macros. First include would go through because NumIncludes == 0, and the second one shouldn't because NumIncludes == 1 && isImport == true. The import in the hidden submodule is incorrect but errors in unused headers shouldn't break actually used headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.llvm.org/D112915 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits