This revision was automatically updated to reflect the committed changes.
massberg marked an inline comment as done.
Closed by commit rG8af9a373ad95: Add missing semantic highlighing for concepts.
(authored by massberg).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Nice! I forgot about the TypeLoc hierarchy, getNameLoc() isn't so obvious...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154580/new/
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);
+ }
massberg updated this revision to Diff 537643.
massberg added a comment.
Directly get correct source loc in case of deduced auto types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154580/new/
https://reviews.llvm.org/D154580
Files:
massberg updated this revision to Diff 537642.
massberg added a comment.
Set correct token for deduced auto types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154580/new/
https://reviews.llvm.org/D154580
Files:
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:966
+
+if (auto *TSI = D->getTypeSourceInfo()) {
+ auto ATL = TSI->getTypeLoc().getContainedAutoTypeLoc();
if we add this logic it definitely needs a comment