]> granicus.if.org Git - clang/commitdiff
Add an assert to get information on buildbot failure.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 23:40:48 +0000 (23:40 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 23:40:48 +0000 (23:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236181 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Preprocessor.cpp

index cd00be8adaf1f933d77560d6f1291bd043405423..231720b8db1a9de3f136d27835f95fc1c16aa7f4 100644 (file)
@@ -627,6 +627,7 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) {
   // 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