summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-24 07:15:46 +0000
committerChris Lattner <sabre@nondot.org>2009-04-24 07:15:46 +0000
commit40493eb6ebc7fd1090a30f62c1eb04e33ebe1100 (patch)
tree7d423c8120c11125796b26aec4867bf0b0f0e114 /clang/lib/Lex
parent469fdc6af3c3e6c77a2e79639f4063b6aab1e92a (diff)
downloadbcm5719-llvm-40493eb6ebc7fd1090a30f62c1eb04e33ebe1100.tar.gz
bcm5719-llvm-40493eb6ebc7fd1090a30f62c1eb04e33ebe1100.zip
fix rdar://6816766 - Crash with function-like macro test at end of directive.
llvm-svn: 69964
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/Lexer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 4d6450b9149..fff6f10fa9f 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -1276,6 +1276,7 @@ unsigned Lexer::isNextPPTokenLParen() {
// Save state that can be changed while lexing so that we can restore it.
const char *TmpBufferPtr = BufferPtr;
+ bool inPPDirectiveMode = ParsingPreprocessorDirective;
Token Tok;
Tok.startToken();
@@ -1283,6 +1284,7 @@ unsigned Lexer::isNextPPTokenLParen() {
// Restore state that may have changed.
BufferPtr = TmpBufferPtr;
+ ParsingPreprocessorDirective = inPPDirectiveMode;
// Restore the lexer back to non-skipping mode.
LexingRawMode = false;
OpenPOWER on IntegriCloud