    Result = ParseExternalDeclaration(attrs);
    return false;
  }
-

 
@@ -483,15 +488,17 @@
     // Late template parsing can begin.
     if (getLang().DelayedTemplateParsing)
       Actions.SetLateTemplateParser(LateTemplateParserCallback, this);
+    if (!PP.isIncrementalProcessingEnabled())
+      Actions.ActOnEndOfTranslationUnit();

     Initialize(*Target);
Index: tools/clang/lib/Parse/Parser.cpp
===================================================================
--- tools/clang/lib/Parse/Parser.cpp	(revision 152550)
+++ tools/clang/lib/Parse/Parser.cpp	(working copy)
@@ -475,6 +475,11 @@
 bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result) {
