]> granicus.if.org Git - clang/commitdiff
add an assertion from Alexei Svitkine!
authorChris Lattner <sabre@nondot.org>
Fri, 13 Feb 2009 23:06:48 +0000 (23:06 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Feb 2009 23:06:48 +0000 (23:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64503 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPLexerChange.cpp

index 244281fde692c2f46e353199aa1d6f07789ff745..ec3447a5af993d78b358643722d2b54a72377665 100644 (file)
@@ -227,8 +227,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
     
     // We're done with the #included file.
     CurLexer.reset();
-  }
-  else {
+  } else {
+    assert(CurPTHLexer && "Got EOF but no current lexer set!");
     CurPTHLexer->getEOF(Result);
     CurPTHLexer.reset();
   }