aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-13 01:03:15 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-13 01:03:15 +0000
commit4d10b40ea8ee489c7b9194aa2b025df4ecd2ab01 (patch)
tree7adfd8cc2aa293a71835909050723cd420c73933 /include/clang/Basic
parent3185d4ac30378995ef70421e2848f77524c2b5d5 (diff)
[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
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/TokenKinds.def2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 25e8d5a635..704f1d9b32 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -103,6 +103,8 @@ TOK(unknown) // Not a token.
TOK(eof) // End of file.
TOK(eod) // End of preprocessing directive (end of line inside a
// directive).
+TOK(included_eof) // End of included file, only if
+ // PreprocessorLexer::EnableIncludedEOF is true.
TOK(code_completion) // Code completion marker
TOK(cxx_defaultarg_end) // C++ default argument end marker