VitaNuo created this revision.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
VitaNuo requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155614

Files:
  clang-tools-extra/clangd/XRefs.cpp


Index: clang-tools-extra/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/clangd/XRefs.cpp
+++ clang-tools-extra/clangd/XRefs.cpp
@@ -1358,18 +1358,13 @@
         Result.Loc.uri = URIMainFile;
         Results.References.push_back(std::move(Result));
       });
-  if (Results.References.empty())
-    return std::nullopt;
-
+ 
   // Add the #include line to the references list.
   ReferencesResult::Reference Result;
   Result.Loc.range =
       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


Index: clang-tools-extra/clangd/XRefs.cpp
===================================================================
--- clang-tools-extra/clangd/XRefs.cpp
+++ clang-tools-extra/clangd/XRefs.cpp
@@ -1358,18 +1358,13 @@
         Result.Loc.uri = URIMainFile;
         Results.References.push_back(std::move(Result));
       });
-  if (Results.References.empty())
-    return std::nullopt;
-
+ 
   // Add the #include line to the references list.
   ReferencesResult::Reference Result;
   Result.Loc.range =
       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
  • [PATCH] D155614: [clang... Viktoriia Bakalova via Phabricator via cfe-commits

Reply via email to