diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index ba9e662f9345..7d2f04c3e323 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -208,10 +208,8 @@ public: private: void finish() override { - if (auto DefinedMacro = locateMacroAt(SearchedLocation, PP)) { + if (auto DefinedMacro = locateMacroAt(SearchedLocation, PP)) MacroInfos.push_back(*DefinedMacro); - assert(Decls.empty()); - } } }; @@ -438,6 +436,7 @@ std::vector findDocumentHighlights(ParsedAST &AST, const SourceManager &SM = AST.getSourceManager(); auto Symbols = getSymbolAtPosition( AST, getBeginningOfIdentifier(AST, Pos, SM.getMainFileID())); + // FIXME: show references to macro within file? auto References = findRefs(Symbols.Decls, AST); std::vector Result;