Added highlighting for members and also changed highlighting for methods into their own HighlightingKind.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LG from my side
| clang-tools-extra/clangd/SemanticHighlighting.h | ||
|---|---|---|
| 28 ↗ | (On Diff #209425) | nit: clang calls these Field which is terser and pretty understandable, I think. (Formally, I think these are data members and "methods" are member functions, but I like the shorter names better) |
| clang-tools-extra/clangd/SemanticHighlighting.cpp | ||
|---|---|---|
| 44 ↗ | (On Diff #209425) | nit: this can be simplified like if (const auto* D = dyn_cast<CXXDestructorDecl>(ME->getMemberDecl())) {
// When calling the destructor manually like: AAA::~A(); The ~ is a
// MemberExpr.
return true;
} |
| 53 ↗ | (On Diff #209425) | It took me a while to understand how the comment associate with the code here, maybe add and we use the MemberExpr in the comment? |
| 142 ↗ | (On Diff #209425) | nit: clang-format. As it is class-related, could you move it to Line 133 (immediately after the Class case), the same to the FieldDecl. |
| clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp | ||
| 140 ↗ | (On Diff #209425) | could you add a test case for static member? |
| clang-tools-extra/clangd/SemanticHighlighting.h | ||
|---|---|---|
| 28 ↗ | (On Diff #209510) | nit: put it Field around Class. |