summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4f10a3e9f058bb8fdcfc3799a1939d1391b96de3 (patch)
tree8e3cdce46ca059f14eba4564188387e61a0113b5 /clang/lib/Lex/PreprocessorLexer.cpp
parent36675b75fbeb6578d510db29ade03596b4bc32af (diff)
downloadbcm5719-llvm-4f10a3e9f058bb8fdcfc3799a1939d1391b96de3.tar.gz
bcm5719-llvm-4f10a3e9f058bb8fdcfc3799a1939d1391b96de3.zip
[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
Diffstat (limited to 'clang/lib/Lex/PreprocessorLexer.cpp')
-rw-r--r--clang/lib/Lex/PreprocessorLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PreprocessorLexer.cpp b/clang/lib/Lex/PreprocessorLexer.cpp
index a64c84d6bbd..390d4c4523b 100644
--- a/clang/lib/Lex/PreprocessorLexer.cpp
+++ b/clang/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();
}
OpenPOWER on IntegriCloud