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

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 7 01:43:55 PST 2022


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<UnaryOperator>(Arg)) {
+      if (UO->getOpcode() == UO_AddrOf)
----------------
ckandeler wrote:
> nridge wrote:
> > Could you add a test case that exercises the `UnaryOperator` case?
> Doesn't the very first hunk in SemanticHighlightingTests.cpp do that?
Yep, my bad, overlooked that


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130015



More information about the cfe-commits mailing list