diff --git a/clang-tools-extra/modularize/PreprocessorTracker.cpp b/clang-tools-extra/modularize/PreprocessorTracker.cpp index 566e2f15a332..5776a6152af0 100644 --- a/clang-tools-extra/modularize/PreprocessorTracker.cpp +++ b/clang-tools-extra/modularize/PreprocessorTracker.cpp @@ -962,6 +962,8 @@ public: llvm::StringRef MacroUnexpanded, llvm::StringRef MacroExpanded, InclusionPathHandle InclusionPathHandle) { + if (InNestedHeader) + return; StringHandle MacroName = addString(II->getName()); PPItemKey InstanceKey(PP, MacroName, H, InstanceLoc); PPItemKey DefinitionKey(PP, MacroName, H, DefinitionLoc);