From 4d10b40ea8ee489c7b9194aa2b025df4ecd2ab01 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 13 Nov 2012 01:03:15 +0000 Subject: [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 --- lib/Lex/PreprocessorLexer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Lex/PreprocessorLexer.cpp') 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(); } -- cgit v1.2.1