[clang] [Clang] Fixed a crash when __PRETTY_FUNCTION__ or __FUNCSIG__ (clang-cl) appears in the trailing return type of the lambda (PR #122611)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 11 11:59:11 PST 2025


================
@@ -774,7 +774,12 @@ std::string PredefinedExpr::ComputeName(PredefinedIdentKind IK,
     const FunctionDecl *Decl = FD;
     if (const FunctionDecl* Pattern = FD->getTemplateInstantiationPattern())
       Decl = Pattern;
-    const FunctionType *AFT = Decl->getType()->getAs<FunctionType>();
+
+    const Type *Ty = Decl->getType().getTypePtrOrNull();
----------------
cor3ntin wrote:

Can you add a comment here?

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


More information about the cfe-commits mailing list