diff --git a/lib/Differentiator/ReverseModeVisitor.cpp b/lib/Differentiator/ReverseModeVisitor.cpp index a125e4606..57809e4af 100644 --- a/lib/Differentiator/ReverseModeVisitor.cpp +++ b/lib/Differentiator/ReverseModeVisitor.cpp @@ -2657,16 +2657,11 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, NumDiffArgs.push_back(args[i]); } std::string Name = "central_difference"; - return config ? m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( - Name, NumDiffArgs, getCurrentScope(), - /*OriginalFnDC=*/nullptr, - /*forCustomDerv=*/false, - /*namespaceShouldExist=*/false, config) - : m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( - Name, NumDiffArgs, getCurrentScope(), - /*OriginalFnDC=*/nullptr, - /*forCustomDerv=*/false, - /*namespaceShouldExist=*/false); + return m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( + Name, NumDiffArgs, getCurrentScope(), + /*OriginalFnDC=*/nullptr, + /*forCustomDerv=*/false, + /*namespaceShouldExist=*/false, config); } StmtDiff ReverseModeVisitor::VisitUnaryOperator(const UnaryOperator* UnOp) { diff --git a/lib/Differentiator/VisitorBase.cpp b/lib/Differentiator/VisitorBase.cpp index 4f3472976..b37efe5dd 100644 --- a/lib/Differentiator/VisitorBase.cpp +++ b/lib/Differentiator/VisitorBase.cpp @@ -756,16 +756,11 @@ namespace clad { NumDiffArgs.insert(NumDiffArgs.end(), args.begin(), args.begin() + numArgs); // Return the found overload. std::string Name = "forward_central_difference"; - return config ? m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( - Name, NumDiffArgs, getCurrentScope(), - /*OriginalFnDC=*/nullptr, - /*forCustomDerv=*/false, - /*namespaceShouldExist=*/false, config) - : m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( - Name, NumDiffArgs, getCurrentScope(), - /*OriginalFnDC=*/nullptr, - /*forCustomDerv=*/false, - /*namespaceShouldExist=*/false); + return m_Builder.BuildCallToCustomDerivativeOrNumericalDiff( + Name, NumDiffArgs, getCurrentScope(), + /*OriginalFnDC=*/nullptr, + /*forCustomDerv=*/false, + /*namespaceShouldExist=*/false, config); } void VisitorBase::CallExprDiffDiagnostics(const clang::FunctionDecl* FD,