[PATCH] D62573: [Index] Correctly set symbol kind of IndirectFieldDecl

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 03:08:22 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE361941: [Index] Correctly set symbol kind of IndirectFieldDecl (authored by ibiryukov, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D62573?vs=201837&id=201851#toc

Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D62573

Files:
  clangd/unittests/CodeCompleteTests.cpp


Index: clangd/unittests/CodeCompleteTests.cpp
===================================================================
--- clangd/unittests/CodeCompleteTests.cpp
+++ clangd/unittests/CodeCompleteTests.cpp
@@ -449,6 +449,20 @@
   Results = completions("nam^");
   EXPECT_THAT(Results.Completions,
               Has("namespace", CompletionItemKind::Snippet));
+
+  // Members of anonymous unions are of kind 'field'.
+  Results = completions(
+      R"cpp(
+        struct X{
+            union {
+              void *a;
+            };
+        };
+        auto u = X().^
+      )cpp");
+  EXPECT_THAT(
+      Results.Completions,
+      UnorderedElementsAre(AllOf(Named("a"), Kind(CompletionItemKind::Field))));
 }
 
 TEST(CompletionTest, NoDuplicates) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62573.201851.patch
Type: text/x-patch
Size: 751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190529/089e581b/attachment.bin>


More information about the cfe-commits mailing list