[PATCH] D70746: [clangd] Highlighting dependent types in more contexts

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 27 01:28:21 PST 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:259
     H.addToken(L.getNameLoc(), HighlightingKind::DependentType);
+    visitDependentTypesInQualifier(L.getQualifierLoc());
+    return true;
----------------
Instead of calling `visitDependentTypesInQualifier`, implement `TraverseNestedNameSpecifierLoc` to catch all their occurrences.

No need to redo the traversal, it should be handled by `RecursiveASTVisitor`.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:263
+
+  // This is similar to DependentNameTypeLoc, but used for
+  // template-ids where the template-name itself is dependent.
----------------
NIT: remove the comment, it is redundant. One can always navigate to the definition of `DependentTemplateSpecializationTypeLoc` if they need to understand what it is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70746





More information about the cfe-commits mailing list