massberg marked 2 inline comments as done.
massberg added inline comments.

================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:969
+       if (ATL.isConstrained()) {
+         StartLoc = ATL.getConceptNameInfo().getEndLoc().getLocWithOffset(1);
+       }
----------------
sammccall wrote:
> getLocWithOffset(1) is just jumping one byte in the source code
> why is this correct?
> 
> IIUC the intention here is to jump to the `auto` token, and the AutoTypeLoc 
> doesn't actually expose this
> 
> I'd suggest:
>  - for now just bailing out - this is not important enough to hack around 
> (and the current hack doesn't seem robust)
>  - if you have the appetite, adding this location to AutoTypeLoc seems like a 
> good thing
It seems that we can directly get the correct location, see above.
The test had been wrong before as the auto in `auto` in `Fooable auto f = ..` 
should have a class deduced token as it would have without the concept.
This is now fixed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154580

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

Reply via email to