aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PreprocessorLexer.cpp
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 /lib/Lex/PreprocessorLexer.cpp
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 'lib/Lex/PreprocessorLexer.cpp')
-rw-r--r--lib/Lex/PreprocessorLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PreprocessorLexer.cpp b/lib/Lex/PreprocessorLexer.cpp
index a64c84d6bb..390d4c4523 100644
--- a/lib/Lex/PreprocessorLexer.cpp
+++ b/lib/Lex/PreprocessorLexer.cpp
@@ -22,7 +22,7 @@ void PreprocessorLexer::anchor() { }
PreprocessorLexer::PreprocessorLexer(Preprocessor *pp, FileID fid)
: PP(pp), FID(fid), InitialNumSLocEntries(0),
ParsingPreprocessorDirective(false),
- ParsingFilename(false), LexingRawMode(false) {
+ ParsingFilename(false), LexingRawMode(false), EnableIncludedEOF(false) {
if (pp)
InitialNumSLocEntries = pp->getSourceManager().local_sloc_entry_size();
}