[cfe-commits] r68966 - /cfe/trunk/lib/Lex/PPDirectives.cpp

Daniel Dunbar daniel at zuster.org
Mon Apr 13 10:57:50 PDT 2009


Author: ddunbar
Date: Mon Apr 13 12:57:49 2009
New Revision: 68966

URL: http://llvm.org/viewvc/llvm-project?rev=68966&view=rev
Log:
Fix assertion failure in PTH when tokens followed a closing #endif.
 - Ted, please check.

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

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

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=68966&r1=68965&r2=68966&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Mon Apr 13 12:57:49 2009
@@ -351,10 +351,9 @@
       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;





More information about the cfe-commits mailing list