[PATCH] D67916: [clangd] Simplify the callside of URI::resolve, NFC.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 07:37:19 PDT 2019


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: clang-tools-extra/clangd/FindSymbols.cpp:48
   if (!Path) {
     return llvm::make_error<llvm::StringError>(
+        formatv("Could not resolve path for URI '{0}' for symbol '{1}': {2}",
----------------
hokein wrote:
> kadircet wrote:
> > `return make_string_error(...` ?
> > 
> > Also the error string regarding `CD.FileURI` should be contained in `Path.takeError` maybe just print:
> > `Could not resolve path for symbol '{0}': {1}, Sym.Name, Path.takeError()` ?
> `make_string_error` is an internal helper in `URI.cpp` only.
ah I see, when I searched for `make_string_error`, there were too many references so I assumed it was a generic helper, but apparently every file has an internal implementation ...

Whatever that can be an adventure for another day...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67916/new/

https://reviews.llvm.org/D67916





More information about the cfe-commits mailing list