summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/SemanticHighlighting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/SemanticHighlighting.cpp')
-rw-r--r--clang-tools-extra/clangd/SemanticHighlighting.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/SemanticHighlighting.cpp b/clang-tools-extra/clangd/SemanticHighlighting.cpp
index 5744e866d1b..c38bf87cb33 100644
--- a/clang-tools-extra/clangd/SemanticHighlighting.cpp
+++ b/clang-tools-extra/clangd/SemanticHighlighting.cpp
@@ -38,10 +38,8 @@ public:
TraverseAST(AST.getASTContext());
// Add highlightings for macro expansions as they are not traversed by the
// visitor.
- // FIXME: Should add highlighting to the macro definitions as well. But this
- // information is not collected in ParsedAST right now.
- for (const SourceLocation &L : AST.getMainFileExpansions())
- addToken(L, HighlightingKind::Macro);
+ for (SourceLocation Loc : AST.getMacros())
+ addToken(Loc, HighlightingKind::Macro);
// Initializer lists can give duplicates of tokens, therefore all tokens
// must be deduplicated.
llvm::sort(Tokens);
OpenPOWER on IntegriCloud