r236285 - Make macro dumping robust against a nonexistent macro.
Richard Smith
richard-llvm at metafoo.co.uk
Thu Apr 30 16:42:10 PDT 2015
Author: rsmith
Date: Thu Apr 30 18:42:10 2015
New Revision: 236285
URL: http://llvm.org/viewvc/llvm-project?rev=236285&view=rev
Log:
Make macro dumping robust against a nonexistent macro.
Modified:
cfe/trunk/lib/Lex/PPMacroExpansion.cpp
Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPMacroExpansion.cpp?rev=236285&r1=236284&r2=236285&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original)
+++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Thu Apr 30 18:42:10 2015
@@ -207,7 +207,7 @@ void Preprocessor::dumpMacroInfo(const I
llvm::errs() << "MacroState " << State << " " << II->getNameStart();
if (State && State->isAmbiguous(*this, II))
llvm::errs() << " ambiguous";
- if (!State->getOverriddenMacros().empty()) {
+ if (State && !State->getOverriddenMacros().empty()) {
llvm::errs() << " overrides";
for (auto *O : State->getOverriddenMacros())
llvm::errs() << " " << O->getOwningModule()->getFullModuleName();
More information about the cfe-commits
mailing list