diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-24 07:15:46 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-24 07:15:46 +0000 |
commit | a864cf7c1d774a0f790bfc46befc87d9dbf1f65c (patch) | |
tree | b5ea3210c833566853435744be6166d0d3f701c3 /lib/Lex/Lexer.cpp | |
parent | 09546d46c320da58fe89f5d6cf32db78cc2d7b96 (diff) |
fix rdar://6816766 - Crash with function-like macro test at end of directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 4d6450b914..fff6f10fa9 100644 --- a/lib/Lex/Lexer.cpp +++ b/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; |