diff --git a/lib/Differentiator/ReverseModeVisitor.cpp b/lib/Differentiator/ReverseModeVisitor.cpp index 6709f7ac4..a6cc249b3 100644 --- a/lib/Differentiator/ReverseModeVisitor.cpp +++ b/lib/Differentiator/ReverseModeVisitor.cpp @@ -1888,17 +1888,6 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, m_ExternalSource->ActBeforeFinalizingVisitCallExpr( CE, OverloadedDerivedFn, DerivedCallArgs, ArgResultDecls, asGrad); - // FIXME: Why are we cloning args here? We already created different - // expressions for call to original function and call to gradient. - // Re-clone function arguments again, since they are required at 2 places: - // call to gradient and call to original function. At this point, each arg - // is either a simple expression or a reference to a temporary variable. - // Therefore cloning it has constant complexity. - std::transform(std::begin(CallArgs), - std::end(CallArgs), - std::begin(CallArgs), - [this](Expr* E) { return Clone(E); }); - Expr* call = nullptr; if (FD->getReturnType()->isReferenceType()) {