[PATCH] D74125: [clangd] Set "spelled" flag for constructor references.

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 06:35:48 PST 2020


kbobyrev accepted this revision.
kbobyrev added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:595
         DeclarationName Name = DeclAndRef.first->getDeclName();
-        bool Spelled = IdentifierToken && Name.isIdentifier() &&
+        auto NameKind = Name.getNameKind();
+        bool IsTargetKind = NameKind == DeclarationName::Identifier ||
----------------
nit: const auto?


================
Comment at: clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp:752
+      const auto ID = SymbolAndRefs.first;
+      if (!(ID == TargetID))
+        continue;
----------------
nit: maybe add operator != to SymbolKind instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74125





More information about the cfe-commits mailing list