[PATCH] D45717: [clangd] Using index for GoToDefinition.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 30 08:07:05 PDT 2018


hokein added a comment.

Thanks for the review!



================
Comment at: clangd/XRefs.cpp:277
+                    // it.
+                    auto ToLSPLocation = [&HintPath](
+                        const SymbolLocation &Loc) -> llvm::Optional<Location> {
----------------
sammccall wrote:
> hokein wrote:
> > sammccall wrote:
> > > (The double-nested lambda is somewhat hard to read, can this just be a top-level function? That's what's needed to share it, right?)
> > Moved it to `XRef.h`, and also replace the one in `findsymbols`.
> This is pretty weird in terms of layering I think :-(
> The function is pretty trivial, but depends on a bunch of random stuff.
> Can we move it back (and live with the duplication) until we come up with a good home?
Reverted it, made it local in this file and added a FIXME.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45717





More information about the cfe-commits mailing list