]> granicus.if.org Git - clang/commit
[preprocessor] When #including something that contributes no tokens at all,
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 13 Nov 2012 01:03:15 +0000 (01:03 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 13 Nov 2012 01:03:15 +0000 (01:03 +0000)
commit4d10b40ea8ee489c7b9194aa2b025df4ecd2ab01
tree7adfd8cc2aa293a71835909050723cd420c73933
parent3185d4ac30378995ef70421e2848f77524c2b5d5
[preprocessor] When #including something that contributes no tokens at all,
don't recursively continue lexing.

This avoids a stack overflow with a sequence of many empty #includes.
rdar://11988695

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167801 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TokenKinds.def
include/clang/Lex/PreprocessorLexer.h
lib/Lex/Lexer.cpp
lib/Lex/PreprocessorLexer.cpp
test/Index/Inputs/empty.h [new file with mode: 0644]
test/Index/pp-many-includes.c [new file with mode: 0644]
tools/libclang/CIndex.cpp