diff options
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | clang/lib/Lex/PPLexerChange.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp index 57110aa246f..3f0c2bb2776 100644 --- a/clang/lib/Lex/PPLexerChange.cpp +++ b/clang/lib/Lex/PPLexerChange.cpp @@ -638,6 +638,8 @@ void Preprocessor::LeaveSubmodule() { bool ExplicitlyPublic = false; for (auto *MD = Macro.second.getLatest(); MD != SavedInfo.Latest; MD = MD->getPrevious()) { + assert(MD && "broken macro directive chain"); + // Skip macros defined in other submodules we #included along the way. Module *Mod = getModuleContainingLocation(MD->getLocation()); if (Mod != Info.M) @@ -673,7 +675,8 @@ void Preprocessor::LeaveSubmodule() { Info.M->NameVisibility = Module::MacrosVisible; Info.M->MacroVisibilityLoc = Info.ImportLoc; ++MacroVisibilityGeneration; - // FIXME: Also mark any exported macros as visible, and check for conflicts. + // FIXME: Also mark any exported modules as visible, and check for + // conflicts. } BuildingSubmoduleStack.pop_back(); |