ilya-biryukov added inline comments.

================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:157
+    if (canHighlightName(E->getName()))
+      addToken(E->getNameLoc(), HighlightingKind::DependentName);
+    return true;
----------------
Could we highlighting based on the kinds of `E->decls()`? If they're all the 
same, you could just use the corresponding highlighting kind.
Most of the time ADL at template instantiation time does not affect the 
resulting highlighting, so we could just assume it's going to stay the same.

If there are no `decls()` or some of them have different highlighting kinds 
(e.g. static and non-static member functions), you could fallback to 
`DependentName`.


================
Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:162
+  bool VisitUnresolvedMemberExpr(UnresolvedMemberExpr *E) {
+    if (canHighlightName(E->getName()))
+      addToken(E->getNameLoc(), HighlightingKind::DependentName);
----------------
Same here. Could we try guessing the highlighting type based on `E->decls()`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67901



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to