Skip to content

Commit

Permalink
Fix cloning MemberCallExpr for older Clang versions
Browse files Browse the repository at this point in the history
This small change prevents a segfault from occuring on older versions
of Clang when trying to clone some member call expressions.
  • Loading branch information
gojakuch authored and vgvassilev committed Jul 29, 2024
1 parent ad08e47 commit ca1fd4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Differentiator/StmtClone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit ca1fd4f

Please sign in to comment.