================
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, 
ArrayRef<Expr *> Args,
         SmallVector<Expr *, 12> ArgExprs(1, NakedFn);
         ArgExprs.append(ArgsWithoutDependentTypes.begin(),
                         ArgsWithoutDependentTypes.end());
+        auto *const LambdaName =
+            DC->isLambda() ? 
cast<VarDecl>(NakedFn->getReferencedDeclOfCallee())
----------------
erichkeane wrote:

I vaguely recall this function not being particularly reliable for lambdas.  
Also, are we sure this is always a VarDecl?  I thought there are cases where 
this is the return of a function (that is, a function returning a lambda, now 
being called) where this would be the function instead.  So at minimum this 
would need a test for that (and this might have to be a dyn_cast).

https://github.com/llvm/llvm-project/pull/101857
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to