[PATCH] D78454: [clangd] Highlight related control flow.

Adam Czachorowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 19 04:49:45 PDT 2020


adamcz accepted this revision.
adamcz added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:907
+        // Highlight the loop keyword itself.
+        Result.push_back(P->ASTNode.getSourceRange().getBegin());
+        break;
----------------
nit: in a do {...} while(...) case, would we want to highlight both keywords?

(doesn't seem very important, feel free to ignore)


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:980
+        auto Refs = findRefs({Decls.begin(), Decls.end()}, AST);
+        // FIXME: we may get multiple
+        // DocumentHighlights with the same location
----------------
nit: weird line wrap here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78454





More information about the cfe-commits mailing list