aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PPDirectives.cpp
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
commit8533bd5a32a12c51341e82d2aef083acbac7c04c (patch)
tree2e255f314c82f4ed408052a0a1954eae8deb8a88 /lib/Lex/PPDirectives.cpp
parentff0a9872aafbe9c0c37b06f33ed013471fc361f8 (diff)
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* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r--lib/Lex/PPDirectives.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp
index 52f673c6d3..24b943254c 100644
--- a/lib/Lex/PPDirectives.cpp
+++ b/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;