Sema::ActOnEndOfTranslationUnit(). This is a (minor) optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162144
91177308-0d34-0410-b5e6-
96231b3b80d8
assert(DelayedDiagnostics.getCurrentPool() == NULL
&& "reached end of translation unit with a pool attached?");
+ // If code completion is enabled, don't perform any end-of-translation-unit
+ // work.
+ if (PP.isCodeCompletionEnabled())
+ return;
+
// Only complete translation units define vtables and perform implicit
// instantiations.
if (TUKind == TU_Complete) {