[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 14 01:33:01 PDT 2019


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

thanks, looks great now!



================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:41
+  if (auto *TD = dyn_cast<TemplateDecl>(D)) {
+    if (auto *Templated = TD->getTemplatedDecl()) {
+      D = Templated;
----------------
nit: remove the enclosing `{}`.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:107
+llvm::Optional<HighlightingKind> kindForCandidateDecls(
+    llvm::iterator_range<OverloadExpr::decls_iterator> Decls) {
+  llvm::Optional<HighlightingKind> Result;
----------------
nit: the parameter type seems a bit tangled, may use `llvm::iterator_range<UnresolvedSetIterator>`, but it is not a big deal, up to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67901





More information about the cfe-commits mailing list