]> granicus.if.org Git - clang/commit
we do in fact have to cache the EOF token returned by the preprocessor.
authorChris Lattner <sabre@nondot.org>
Mon, 12 Jul 2010 04:25:32 +0000 (04:25 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 12 Jul 2010 04:25:32 +0000 (04:25 +0000)
commit63dae6e5ad23cab32f5e556c1b0dc3e4576edc83
tree231f43cae24001f7175042d4dc1b7dae68db5e99
parent9fc1873a3da0af8ef91e4f1927f3540f9af2038f
we do in fact have to cache the EOF token returned by the preprocessor.
In the case of backtracking, the cached token lexer will be the only
lexer on the stack, without this the token stack will be empty and EOF
won't be returned.

This fixes PR7072.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108124 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/PPCaching.cpp
test/Parser/backtrack-crash.cpp [new file with mode: 0644]