Added highlighting for members and also changed highlighting for methods into their own HighlightingKind.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34848 Build 34847: arc lint + arc unit
Event Timeline
LG from my side
| clang-tools-extra/clangd/SemanticHighlighting.h | ||
|---|---|---|
| 28 | 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 | 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 | 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 | 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 | could you add a test case for static member? | |
| clang-tools-extra/clangd/SemanticHighlighting.h | ||
|---|---|---|
| 28 | nit: put it Field around Class. | |
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)