[PATCH] D119077: clangd SemanticHighlighting: added support for highlighting overloaded operators

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 7 01:54:53 PST 2022

nridge added a comment.

I haven't looked at the patch in detail, but one high level question: have you considered the possibility of adding these highlightings during the findExplicitReferences <https://searchfox.org/llvm/rev/bad1b7fbb0fec532f097ac59805562020f895962/clang-tools-extra/clangd/SemanticHighlighting.cpp#794> phase, rather than in `CollectExtraHighlightings`? (I haven't thought through whether that would work, just wondering if you have. The reason this is worth asking is that if we can get `findExplicitReferences` to handle overloaded operator calls, other clangd features that use `findExplicitReferences` would benefit from knowing about such calls as well.)

Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:662
-    // FIXME ...here it would make sense though.
+    // Already handled by VisitCXXOperatorCallExpr.
     if (isa<CXXOperatorCallExpr>(E))
This FIXME was specifically about highlighting mutable reference arguments for overloaded operator calls, so it remains unfixed. (I realize that wasn't super clear.)



More information about the cfe-commits mailing list