Do not reset TUScope when we are in incremental processing mode.

Patch by Axel Naumann!

Reviewed by Richard Smith and me.

llvm-svn: 284372
This commit is contained in:
Vassil Vassilev 2016-10-17 10:15:25 +00:00
parent 7d97e73589
commit 45bf62fc5e
1 changed files with 4 additions and 2 deletions

View File

@ -708,6 +708,7 @@ void Sema::ActOnEndOfTranslationUnit() {
if (TUKind == TU_Prefix) {
// Translation unit prefixes don't need any of the checking below.
if (!PP.isIncrementalProcessingEnabled())
TUScope = nullptr;
return;
}
@ -908,6 +909,7 @@ void Sema::ActOnEndOfTranslationUnit() {
assert(ParsingInitForAutoVars.empty() &&
"Didn't unmark var as having its initializer parsed");
if (!PP.isIncrementalProcessingEnabled())
TUScope = nullptr;
}