r236181 - Add an assert to get information on buildbot failure.

Richard Smith richard-llvm at metafoo.co.uk
Wed Apr 29 16:40:49 PDT 2015


Author: rsmith
Date: Wed Apr 29 18:40:48 2015
New Revision: 236181

URL: http://llvm.org/viewvc/llvm-project?rev=236181&view=rev
Log:
Add an assert to get information on buildbot failure.

Modified:
    cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=236181&r1=236180&r2=236181&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Wed Apr 29 18:40:48 2015
@@ -627,6 +627,7 @@ bool Preprocessor::HandleIdentifier(Toke
   // If this is a macro to be expanded, do it.
   if (MacroDefinition MD = getMacroDefinition(&II)) {
     auto *MI = MD.getMacroInfo();
+    assert(MI && "macro definition with no macro info?");
     if (!DisableMacroExpansion) {
       if (!Identifier.isExpandDisabled() && MI->isEnabled()) {
         // C99 6.10.3p10: If the preprocessing token immediately after the





More information about the cfe-commits mailing list