ilya-biryukov added inline comments.

================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:495
   struct Visitor : TypeLocVisitor<Visitor> {
-    llvm::Optional<ReferenceLoc> Ref;
+    llvm::SmallVector<ReferenceLoc, 2> Refs;
 
----------------
Could we keep an `llvm::Optional<>` here in the visitor?
The logic in `VisitElaboratedTypeLoc` looks cheesy if there's more than 1 
reference stored...

The function can keep returning `SmallVector`, that's totally fine.


================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:603
            "0: targets = {ns}\n"
-           "1: targets = {ns::global}, qualifier = 'ns::'\n"},
+           "1: targets = {ns::global}, qualifier = 'ns::', decl\n"},
           // Simple types.
----------------
Similar to `using namespace`, this should be a non-decl reference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68977



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to