Add correspoding patch ready to go in clang's mainline.

git-svn-id: http://root.cern.ch/svn/root/trunk@47820 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Vassil Vassilev 2012-12-04 15:21:06 +00:00
parent 3f150a8d8b
commit 300466790f

View File

@ -0,0 +1,38 @@
Index: tools/clang/lib/Sema/Sema.cpp
===================================================================
--- tools/clang/lib/Sema/Sema.cpp (revision 47812)
+++ tools/clang/lib/Sema/Sema.cpp (working copy)
@@ -572,7 +572,8 @@
if (TUKind == TU_Prefix) {
// Translation unit prefixes don't need any of the checking below.
- TUScope = 0;
+ if (!PP.isIncrementalProcessingEnabled())
+ TUScope = 0;
return;
}
@@ -754,7 +755,8 @@
assert(ParsingInitForAutoVars.empty() &&
"Didn't unmark var as having its initializer parsed");
- TUScope = 0;
+ if (!PP.isIncrementalProcessingEnabled())
+ TUScope = 0;
}
Index: tools/clang/lib/Parse/Parser.cpp
===================================================================
--- tools/clang/lib/Parse/Parser.cpp (revision 47812)
+++ tools/clang/lib/Parse/Parser.cpp (working copy)
@@ -564,8 +564,7 @@
// Late template parsing can begin.
if (getLangOpts().DelayedTemplateParsing)
Actions.SetLateTemplateParser(LateTemplateParserCallback, this);
- if (!PP.isIncrementalProcessingEnabled())
- Actions.ActOnEndOfTranslationUnit();
+ Actions.ActOnEndOfTranslationUnit();
//else don't tell Sema that we ended parsing: more input might come.
return true;