diff options
author | Viktoriia Bakalova <bakalova@google.com> | 2023-07-18 15:48:24 +0000 |
---|---|---|
committer | Viktoriia Bakalova <bakalova@google.com> | 2023-07-19 08:32:53 +0000 |
commit | 22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd (patch) | |
tree | b580f55d8cb306cd518b5046a9b0293c7ce637d8 | |
parent | 4389f9b2adcf78cbe07d60e27b1969fc2eb2f619 (diff) | |
download | llvm-22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.zip llvm-22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.tar.gz llvm-22605f5f1bf8a6e4a18171ea76e8fcfa7fa783fd.tar.bz2 |
[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
-rw-r--r-- | clang-tools-extra/clangd/XRefs.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index 29ce1f3..80a7d02 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 |