summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-13 17:57:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-13 17:57:49 +0000
commit2cba6be4993c0ef09afe01d5aef809d43527858c (patch)
tree58138b11123f08d6f83fb5408286b2e0cbca41f8
parenta8854654ac2d05fd5d04afdcfd9204e5b8603b3f (diff)
downloadbcm5719-llvm-2cba6be4993c0ef09afe01d5aef809d43527858c.tar.gz
bcm5719-llvm-2cba6be4993c0ef09afe01d5aef809d43527858c.zip
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* llvm-svn: 68966
-rw-r--r--clang/lib/Lex/PPDirectives.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 52f673c6d3a..24b943254cf 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -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;
OpenPOWER on IntegriCloud