[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 06:47:36 PDT 2024


================
@@ -4022,7 +4022,10 @@ CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(
 
     std::string Name;
     llvm::raw_string_ostream OS(Name);
-    FDecl->getDeclName().print(OS, Policy);
+    auto const DeclName = (getKind() == CK_Lambda)
----------------
erichkeane wrote:

For diagnostics, we print this exclusively based on type by printing "lambda  line:col" or something like that.  That said, `operator()` IS the name of this function, so I'd not want us to do away with that.

https://github.com/llvm/llvm-project/pull/101857


More information about the cfe-commits mailing list