sammccall accepted this revision.
sammccall added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:657
 
+  auto ToFunctionDecl = [](const Decl *D) -> const FunctionDecl * {
+    // Extract lambda from variables.
----------------
can this be a separate function rather than a local lambda?

I think the name could be clearer, e.g. `getUnderlyingFunction`


================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:819
         )cpp",
        [](HoverInfo &HI) {
          HI.NamespaceScope = "";
----------------
I'm slightly nervous about the fact that "lambda" doesn't appear anywhere here.

e.g. maybe the Type should be "<lambda> bool(int, bool)" or so?
Many lambdas are not interchangeable with "plain" functions references.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62814



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to