Author: Viktoriia Bakalova Date: 2023-07-19T08:32:53Z New Revision: 22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd
URL: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd DIFF: https://github.com/llvm/llvm-project/commit/22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.diff LOG: [clangd] Make an include always refer to itself. Background: clang-review expects all referents to have definition, declaration or reference(s). Differential Revision: https://reviews.llvm.org/D155614 Added: Modified: clang-tools-extra/clangd/XRefs.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 29ce1f3e0d0e3b..80a7d028ddf902 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -1367,9 +1367,6 @@ maybeFindIncludeReferences(ParsedAST &AST, Position Pos, rangeTillEOL(SM.getBufferData(SM.getMainFileID()), Inc.HashOffset); Result.Loc.uri = URIMainFile; Results.References.push_back(std::move(Result)); - - if (Results.References.empty()) - return std::nullopt; return Results; } } // namespace _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits