[clang-tools-extra] r367672 - [clangd] Remove bad assert: nothing relies on it, and the reasons it was true no longer hold.
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 2 03:39:47 PDT 2019
Author: sammccall
Date: Fri Aug 2 03:39:46 2019
New Revision: 367672
URL: http://llvm.org/viewvc/llvm-project?rev=367672&view=rev
Log:
[clangd] Remove bad assert: nothing relies on it, and the reasons it was true no longer hold.
Modified:
clang-tools-extra/trunk/clangd/XRefs.cpp
Modified: clang-tools-extra/trunk/clangd/XRefs.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/XRefs.cpp?rev=367672&r1=367671&r2=367672&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/XRefs.cpp (original)
+++ clang-tools-extra/trunk/clangd/XRefs.cpp Fri Aug 2 03:39:46 2019
@@ -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<DocumentHighlight> findDocum
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<DocumentHighlight> Result;
More information about the cfe-commits
mailing list