[llvm-branch-commits] [cfe-branch] r121568 - /cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Daniel Dunbar daniel at zuster.org
Fri Dec 10 13:38:30 PST 2010


Author: ddunbar
Date: Fri Dec 10 15:38:30 2010
New Revision: 121568

URL: http://llvm.org/viewvc/llvm-project?rev=121568&view=rev
Log:
Merge r121413:
--
Author: Douglas Gregor <dgregor at apple.com>
Date:   Thu Dec 9 21:27:43 2010 +0000

    Gather cached code completions after the first reparse, not after the
    second reparse.

Modified:
    cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp

Modified: cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp?rev=121568&r1=121567&r2=121568&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Frontend/ASTUnit.cpp Fri Dec 10 15:38:30 2010
@@ -860,6 +860,14 @@
   }
 
   Invocation.reset(Clang.takeInvocation());
+
+  if (ShouldCacheCodeCompletionResults) {
+    if (CacheCodeCompletionCoolDown > 0)
+      --CacheCodeCompletionCoolDown;
+    else if (top_level_size() != NumTopLevelDeclsAtLastCompletionCache)
+      CacheCodeCompletionResults();
+  }
+
   return false;
   
 error:
@@ -1601,14 +1609,6 @@
   
   // Parse the sources
   bool Result = Parse(OverrideMainBuffer);  
-  
-  if (ShouldCacheCodeCompletionResults) {
-    if (CacheCodeCompletionCoolDown > 0)
-      --CacheCodeCompletionCoolDown;
-    else if (top_level_size() != NumTopLevelDeclsAtLastCompletionCache)
-      CacheCodeCompletionResults();
-  }
-  
   return Result;
 }
 





More information about the llvm-branch-commits mailing list