nridge added inline comments.
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:1018
+const auto BaseType = E->getBaseType();
+if ((E->isArrow() && BaseType->getPointeeType().isConstQualified()) ||
+(!E->isArrow() && BaseType.isConstQualified()))
-
t-troebst added a comment.
I've added some logic to get const-ness for dependent expressions. I think
you're right that its probably reasonable to do this since mutable is almost
always used in member functions where the type isn't dependent anyways.
Repository:
rG LLVM Github Monorepo
CHAN
t-troebst updated this revision to Diff 518641.
t-troebst added a comment.
Add best effort attempt to get const-ness for dependent member expressions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148284/new/
https://reviews.llvm.org/D148284
Files
nridge added a comment.
Thanks for the patch!
`addExtraModifier` is a kind of hacky mechanism to attach modifiers in
`CollectExtraHighlightings` to tokens created during
`findExplicitReferences()`; it would be nicer to add the modifier at the time
of creating the token, but it doesn't look lik
t-troebst updated this revision to Diff 513406.
t-troebst added a comment.
Changed `isConstQualifed()` to the custom `isConst()` (though this `isConst()`
behaves strangely for pointer types, we should fix this separately and keep
them synced for now).
Repository:
rG LLVM Github Monorepo
CHA
t-troebst created this revision.
t-troebst added a reviewer: nridge.
t-troebst added a project: clang-tools-extra.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
t-troebst requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.