diff options
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 721760afa0e..84f1ea5b1fa 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -293,11 +293,11 @@ bool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, for (MacroDirective::DefInfo PrevDef = Def.getPreviousDefinition(); PrevDef && !PrevDef.isUndefined(); PrevDef = PrevDef.getPreviousDefinition()) { - if (PrevDef.getDirective()->isAmbiguous()) { - Diag(PrevDef.getMacroInfo()->getDefinitionLoc(), - diag::note_pp_ambiguous_macro_other) - << Identifier.getIdentifierInfo(); - } + Diag(PrevDef.getMacroInfo()->getDefinitionLoc(), + diag::note_pp_ambiguous_macro_other) + << Identifier.getIdentifierInfo(); + if (!PrevDef.getDirective()->isAmbiguous()) + break; } } |