From b59992f6e1368fe0886be296a8f87285090762e9 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 18 Dec 2024 18:21:41 +0000 Subject: [PATCH] Remove extra variable, rely on the one that already exists --- lib/Differentiator/ReverseModeVisitor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Differentiator/ReverseModeVisitor.cpp b/lib/Differentiator/ReverseModeVisitor.cpp index 1080788be..89f3a17ad 100644 --- a/lib/Differentiator/ReverseModeVisitor.cpp +++ b/lib/Differentiator/ReverseModeVisitor.cpp @@ -1959,12 +1959,11 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, pullbackRequest.VerboseDiags = false; pullbackRequest.EnableTBRAnalysis = m_DiffReq.EnableTBRAnalysis; pullbackRequest.EnableVariedAnalysis = m_DiffReq.EnableVariedAnalysis; - bool isaMethod = isa(FD); for (size_t i = 0, e = FD->getNumParams(); i < e; ++i) if (MD && isLambdaCallOperator(MD)) { if (const auto* paramDecl = FD->getParamDecl(i)) pullbackRequest.DVI.push_back(paramDecl); - } else if (DerivedCallOutputArgs[i + isaMethod]) + } else if (DerivedCallOutputArgs[i + (bool)MD]) pullbackRequest.DVI.push_back(FD->getParamDecl(i)); FunctionDecl* pullbackFD = nullptr;