[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)
commit4f10a3e9f058bb8fdcfc3799a1939d1391b96de3
tree8e3cdce46ca059f14eba4564188387e61a0113b5
parent36675b75fbeb6578d510db29ade03596b4bc32af
[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

llvm-svn: 167801
clang/include/clang/Basic/TokenKinds.def
clang/include/clang/Lex/PreprocessorLexer.h
clang/lib/Lex/Lexer.cpp
clang/lib/Lex/PreprocessorLexer.cpp
clang/test/Index/Inputs/empty.h [new file with mode: 0644]
clang/test/Index/pp-many-includes.c [new file with mode: 0644]
clang/tools/libclang/CIndex.cpp