[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 24 03:34:46 PDT 2024
================
@@ -1574,6 +1574,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor &PP,
}
}
+ FileInfo.IsLocallyIncluded = true;
----------------
sam-mccall wrote:
I'd consider placing this at the end of HandleHeaderIncludeOrImport rather than here:
- it looks like there are cases where this function returns true and we don't enter the file textually (or at least, it's not *obvious* that there are no such cases)
- having a load-bearing side-effect of a "should we do X" query seems unexpected and liable to break during refactoring or in edge cases
Concretely I don't see a case where this doesn't work though, up to you.
https://github.com/llvm/llvm-project/pull/89441
More information about the cfe-commits
mailing list