[PATCH] D64918: [ASTUnit] Fix a regression in cached completions

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 08:24:59 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL366448: [ASTUnit] Fix a regression in cached completions (authored by ibiryukov, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64918?vs=210555&id=210580#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64918/new/

https://reviews.llvm.org/D64918

Files:
  cfe/trunk/lib/Frontend/ASTUnit.cpp
  cfe/trunk/test/Index/complete-qualified-cached.cpp


Index: cfe/trunk/test/Index/complete-qualified-cached.cpp
===================================================================
--- cfe/trunk/test/Index/complete-qualified-cached.cpp
+++ cfe/trunk/test/Index/complete-qualified-cached.cpp
@@ -0,0 +1,22 @@
+namespace a_namespace {};
+class Class { static void foo(); };
+Class::
+// Completion for a_namespace should be available at the start of the line.
+// START-OF-LINE: a_namespace
+// START-OF-LINE: Class
+// -- Using cached completions.
+// RUN: CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:3:1 %s \
+// RUN: | FileCheck --check-prefix=START-OF-LINE %s
+// -- Without cached completions.
+// RUN: c-index-test -code-completion-at=%s:3:1 %s \
+// RUN: | FileCheck --check-prefix=START-OF-LINE %s
+//
+//
+// ... and should not be available after 'Class::^'
+// AFTER-QUALIFIER: Class
+// -- Using cached completions.
+// RUN: CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:3:8 %s \
+// RUN: | FileCheck --implicit-check-not=a_namespace --check-prefix=AFTER-QUALIFIER %s
+// -- Without cached completions.
+// RUN: c-index-test -code-completion-at=%s:3:8 %s \
+// RUN: | FileCheck --implicit-check-not=a_namespace --check-prefix=AFTER-QUALIFIER %s
Index: cfe/trunk/lib/Frontend/ASTUnit.cpp
===================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp
@@ -435,7 +435,6 @@
           | (1LL << CodeCompletionContext::CCC_UnionTag)
           | (1LL << CodeCompletionContext::CCC_ClassOrStructTag)
           | (1LL << CodeCompletionContext::CCC_Type)
-          | (1LL << CodeCompletionContext::CCC_Symbol)
           | (1LL << CodeCompletionContext::CCC_SymbolOrNewName)
           | (1LL << CodeCompletionContext::CCC_ParenthesizedExpression);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64918.210580.patch
Type: text/x-patch
Size: 1806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190718/a930025d/attachment.bin>


More information about the llvm-commits mailing list