]> granicus.if.org Git - clang/commitdiff
Fix assertion failure in PTH when tokens followed a closing #endif.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 13 Apr 2009 17:57:49 +0000 (17:57 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 13 Apr 2009 17:57:49 +0000 (17:57 +0000)
 - Ted, please check.

 - Missing test case because PTH won't reliably cache the tokens in a
   test case. *cough*

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68966 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPDirectives.cpp

index 52f673c6d3a3f0cb3a33fab59655a04ec0bf969f..24b943254cff78db472a06603b9072a1c03a49cd 100644 (file)
@@ -351,10 +351,9 @@ void Preprocessor::PTHSkipExcludedConditionalBlock() {
       if (!CondInfo.FoundNonSkip) {
         CondInfo.FoundNonSkip = true;
         
-        // Consume the eom token.
+        // Scan until the eom token.
         CurPTHLexer->ParsingPreprocessorDirective = true;
-        LexUnexpandedToken(Tok);
-        assert(Tok.is(tok::eom));
+        DiscardUntilEndOfDirective();
         CurPTHLexer->ParsingPreprocessorDirective = false;
         
         break;