allows semantic hightlighting macro definition
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang-tools-extra/clangd/ParsedAST.cpp | ||
---|---|---|
104 ↗ | (On Diff #219067) | The name doesn't fit into what it does anymore, maybe rename to CollectMainFileMacroLocations? |
clang-tools-extra/clangd/ParsedAST.cpp | ||
---|---|---|
104 ↗ | (On Diff #219067) | Agree, maybe even shorter - CollectMainFileMacros? |
clang-tools-extra/clangd/ParsedAST.h | ||
125 ↗ | (On Diff #219067) | NIT: s/Does not include expansions/Does not include locations? To avoid confusion, since they are definitions and expansions now. |
126 ↗ | (On Diff #219067) | Could we you rename this to MacroIdentifierLocs? Or something similar not mentioning expansions in the name. MacroExpLocs could still be interpreted as locations of expansions, rather than locations of all macro identifiers. |
clang-tools-extra/clangd/unittests/ParsedASTTests.cpp | ||
234 ↗ | (On Diff #219067) | We should probably keep the test as is and make sure we also collect inside the preamble. |
LGTM.
We should probably also take a look at highlighting macros inside the preamble part of the main file.
@hokein, are you planning to do this or should we just file a bug for this for now?
clang-tools-extra/clangd/SemanticHighlighting.cpp | ||
---|---|---|
38 ↗ | (On Diff #219343) | NIT: use SourceLocation, it's just an int, so no need to use references here. |