[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-07 Thread Christian Kandeler via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2bf960aef08e: [clangd] Add "usedAsMutablePointer" highlighting modifier (authored by ckandeler). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130015/new/ h

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-07 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 473603. ckandeler marked an inline comment as done. ckandeler added a comment. Rebased and updated comment as indicated in review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130015/new/ https://reviews.llv

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-07 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:592 + Arg = IC->getSubExprAsWritten(); +if (auto *UO = dyn_cast(Arg)) { + if (UO->getOpcode()

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-07 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:592 + Arg = IC->getSubExprAsWritten(); +if (auto *UO = dyn_cast(Arg)) { + if (UO->getOpcode() == UO_AddrOf) nridge wrote: > Could you add a test case that

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-11-05 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D130015#3702004 , @ckandeler wrote: > IMO the relevant point is the (non-)const-ness of the corresponding > parameter, i.e. can the passed object get mutated or not. The fact that > there's an ampersand at the call site (which

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-10 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:603 H.addExtraModifier(*Location, - HighlightingModifier::UsedAsMutableReference); + IsRef ? HighlightingModifier::UsedAsMutableRe

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-10 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler updated this revision to Diff 451420. ckandeler marked an inline comment as done. ckandeler added a comment. Fixed style issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130015/new/ https://reviews.llvm.org/D130015 Files: clang-to

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I agree with Nathan to some extent that this doesn't carry as much weight, but if we can get it without introducing much complexity to the user (i.e. a new modifier they need to remember), it's worth having since we don't need too much effort to support it.

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-05 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. IMO the relevant point is the (non-)const-ness of the corresponding parameter, i.e. can the passed object get mutated or not. The fact that there's an ampersand at the call site (which is not even the case if the variable is itself a pointer) does not tell me that.

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Sorry, I'm travelling and probably won't be able to respond promptly, but my first thought here is that this doesn't seem as well motivated as `usedAsMutableReference`, since taking a pointer to an object involves using explicit syntax (`&obj`) that taking a reference do

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-08-04 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130015/new/ https://reviews.llvm.org/D130015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D130015: [clangd] Add "usedAsMutablePointer" highlighting modifier

2022-07-18 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. ckandeler requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Counterpart to "usedAsMutabl