sammccall added a comment.

Sorry about the delay here.

Making the whole AutoTypeLoc resolve to the concept doesn't seem right - the 
`auto` part does not refer to the concept, and in principle refers to another 
type entirely.

Really I think there should be a child node representing just the concept part, 
probably a ConceptReference.

Compared to the case we discussed where constrained auto is a template type 
param, this looks easier: all the information is there in AutoTypeLoc.
I think we need RecursiveASTVisitor to assemble it into a ConceptReference, and 
(to use it with SelectionTree) we need the ability to store it in a 
DynTypedNode.



================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:581
+
+    [[Fooable]] auto i = 42;
+  )cpp";
----------------
this is going to have the same behavior on the `auto` token, right?

This is my main practical concern, that go-to-definition, hover, find-refs, 
go-to-type etc on `auto` will now treat `Fooable` as their target.

(That said, I'm not sure exactly how common it is for `auto` to be constrained 
in a non-dependent context...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154853

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

Reply via email to