[llvm-branch-commits] [cfe-branch] r366717 - Merging r366448 and r366457:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jul 22 11:12:26 PDT 2019
Author: hans
Date: Mon Jul 22 11:12:26 2019
New Revision: 366717
URL: http://llvm.org/viewvc/llvm-project?rev=366717&view=rev
Log:
Merging r366448 and r366457:
------------------------------------------------------------------------
r366448 | ibiryukov | 2019-07-18 17:21:34 +0200 (Thu, 18 Jul 2019) | 24 lines
[ASTUnit] Fix a regression in cached completions
Summary:
After r345152 cached completions started adding namespaces after
nested name specifiers, e.g. in `some_name::^`
The CCC_Symbol indicates the completed item cannot be a namespace (it is
described as being "a type, a function or a variable" in the comments).
Therefore, 'nested specifier' completions should only be added from cache
when the context is CCC_SymbolOrNewName (which roughly seems to indicate
that a nested name specifier is allowed).
Fixes https://bugs.llvm.org/show_bug.cgi?id=42646
Reviewers: kadircet, sammccall
Reviewed By: kadircet, sammccall
Subscribers: arphaman, nik, sammccall, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64918
------------------------------------------------------------------------
------------------------------------------------------------------------
r366457 | ibiryukov | 2019-07-18 18:24:09 +0200 (Thu, 18 Jul 2019) | 1 line
[ASTUnit] Attempt to unbreak Windows buildbots after r366448
------------------------------------------------------------------------
Added:
cfe/branches/release_90/test/Index/complete-qualified-cached.cpp
- copied, changed from r366448, cfe/trunk/test/Index/complete-qualified-cached.cpp
Modified:
cfe/branches/release_90/ (props changed)
cfe/branches/release_90/lib/Frontend/ASTUnit.cpp
Propchange: cfe/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jul 22 11:12:26 2019
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:366429,366474,366480,366483,366511,366699
+/cfe/trunk:366429,366448,366457,366474,366480,366483,366511,366699
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_90/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/lib/Frontend/ASTUnit.cpp?rev=366717&r1=366716&r2=366717&view=diff
==============================================================================
--- cfe/branches/release_90/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/branches/release_90/lib/Frontend/ASTUnit.cpp Mon Jul 22 11:12:26 2019
@@ -435,7 +435,6 @@ void ASTUnit::CacheCodeCompletionResults
| (1LL << CodeCompletionContext::CCC_UnionTag)
| (1LL << CodeCompletionContext::CCC_ClassOrStructTag)
| (1LL << CodeCompletionContext::CCC_Type)
- | (1LL << CodeCompletionContext::CCC_Symbol)
| (1LL << CodeCompletionContext::CCC_SymbolOrNewName)
| (1LL << CodeCompletionContext::CCC_ParenthesizedExpression);
Copied: cfe/branches/release_90/test/Index/complete-qualified-cached.cpp (from r366448, cfe/trunk/test/Index/complete-qualified-cached.cpp)
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_90/test/Index/complete-qualified-cached.cpp?p2=cfe/branches/release_90/test/Index/complete-qualified-cached.cpp&p1=cfe/trunk/test/Index/complete-qualified-cached.cpp&r1=366448&r2=366717&rev=366717&view=diff
==============================================================================
--- cfe/trunk/test/Index/complete-qualified-cached.cpp (original)
+++ cfe/branches/release_90/test/Index/complete-qualified-cached.cpp Mon Jul 22 11:12:26 2019
@@ -5,7 +5,7 @@ Class::
// 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: env 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 \
@@ -15,7 +15,7 @@ Class::
// ... 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: env 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 \
More information about the llvm-branch-commits
mailing list