kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:556
 
+  // We re-define Traverse*, since there's no corresponding Visit*.
+  bool TraverseTemplateArgumentLoc(TemplateArgumentLoc A) {
----------------
... and we need it because, template template decls are visited through it ?


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:567
+      break;
+    case TemplateArgument::Declaration:
+      break; // FIXME: can this actually happen in TemplateArgumentLoc?
----------------
I suppose these corresponds to non-type template paramters, don't they? (which 
should make it similar to integral case)


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:618
-    if (Ref->NameLoc.isInvalid()) {
-      dlog("invalid location at node {0}", nodeToString(N));
       return;
----------------
can we keep dlog ?


================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:751
+            int func();
+            template <int(*)()> struct wrapper {};
+
----------------
can you also name the template param, add a reference in wrapper and check for 
it ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68137



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

Reply via email to