[SourceManager] Skip module maps when searching files for macro arguments
Differential Revision: https://reviews.llvm.org/D86230
This commit is contained in:
1 parent
81e5f298c4
commit
e7870223d8
1 file changed
+6
-1
@@ -1761,7 +1761,12 @@ void SourceManager::computeMacroArgsCache(MacroArgsMap &MacroArgsCache,
|
||||
if (Invalid)
|
||||
return;
|
||||
if (Entry.isFile()) {
|
||||
SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc();
|
||||
auto File = Entry.getFile();
|
||||
if (File.getFileCharacteristic() == C_User_ModuleMap ||
|
||||
File.getFileCharacteristic() == C_System_ModuleMap)
|
||||
continue;
|
||||
|
||||
SourceLocation IncludeLoc = File.getIncludeLoc();
|
||||
bool IncludedInFID =
|
||||
(IncludeLoc.isValid() && isInFileID(IncludeLoc, FID)) ||
|
||||
// Predefined header doesn't have a valid include location in main
|
||||
|
||||
Reference in new issue
Block a user