Skip to content

Commit fb564e7

Browse files
Merge pull request #2036 from jkorous-apple/macro-args
Macro args
2 parents c29e3a5 + 9a59bab commit fb564e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/lib/Basic/SourceManager.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,12 @@ void SourceManager::computeMacroArgsCache(MacroArgsMap &MacroArgsCache,
17911791
if (Invalid)
17921792
return;
17931793
if (Entry.isFile()) {
1794-
SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc();
1794+
auto& File = Entry.getFile();
1795+
if (File.getFileCharacteristic() == C_User_ModuleMap ||
1796+
File.getFileCharacteristic() == C_System_ModuleMap)
1797+
continue;
1798+
1799+
SourceLocation IncludeLoc = File.getIncludeLoc();
17951800
bool IncludedInFID =
17961801
(IncludeLoc.isValid() && isInFileID(IncludeLoc, FID)) ||
17971802
// Predefined header doesn't have a valid include location in main

0 commit comments

Comments
 (0)