From da504cd6b9750f7467e8651bb2a6e116461aabab Mon Sep 17 00:00:00 2001 From: Atell Krasnopolski Date: Mon, 29 Jul 2024 21:50:53 +0200 Subject: [PATCH] Fix cloning `MemberCallExpr` for older Clang versions This small change prevents a segfault from occuring on older versions of Clang when trying to clone some member call expressions. --- lib/Differentiator/StmtClone.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Differentiator/StmtClone.cpp b/lib/Differentiator/StmtClone.cpp index 467b43e20..15b32aebe 100644 --- a/lib/Differentiator/StmtClone.cpp +++ b/lib/Differentiator/StmtClone.cpp @@ -365,7 +365,7 @@ Stmt* StmtClone::VisitCXXOperatorCallExpr(CXXOperatorCallExpr* Node) { Stmt* StmtClone::VisitCXXMemberCallExpr(CXXMemberCallExpr * Node) { CXXMemberCallExpr* result = clad_compat::CXXMemberCallExpr_Create( - Ctx, Clone(Node->getCallee()), 0, CloneType(Node->getType()), + Ctx, Clone(Node->getCallee()), {}, CloneType(Node->getType()), Node->getValueKind(), Node->getRParenLoc() /*FP*/ CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node));