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 | 40493eb6ebc7fd1090a30f62c1eb04e33ebe1100 (patch) | |
| tree | 7d423c8120c11125796b26aec4867bf0b0f0e114 /clang/lib/Lex | |
| parent | 469fdc6af3c3e6c77a2e79639f4063b6aab1e92a (diff) | |
| download | bcm5719-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.cpp | 2 |
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; |

