Skip to content

Commit

Permalink
Remove dead code. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Dec 30, 2024
1 parent a2e1c50 commit a8a40d9
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/Differentiator/ReverseModeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,8 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
assert(m_DiffReq.Function && "Must not be null.");

DiffParams args{};
if (m_DiffReq.Args)
for (const auto& dParam : m_DiffReq.DVI)
args.push_back(dParam.param);
else
std::copy(FD->param_begin(), FD->param_end(), std::back_inserter(args));
if (args.empty())
return {};
for (const auto& dParam : m_DiffReq.DVI)
args.push_back(dParam.param);

if (m_ExternalSource)
m_ExternalSource->ActAfterParsingDiffArgs(m_DiffReq, args);
Expand Down Expand Up @@ -359,11 +354,8 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context,
assert(m_DiffReq.Function && "Must not be null.");

DiffParams args{};
if (!m_DiffReq.DVI.empty())
for (const auto& dParam : m_DiffReq.DVI)
args.push_back(dParam.param);
else
std::copy(FD->param_begin(), FD->param_end(), std::back_inserter(args));
for (const auto& dParam : m_DiffReq.DVI)
args.push_back(dParam.param);
#ifndef NDEBUG
bool isStaticMethod = utils::IsStaticMethod(FD);
assert((!args.empty() || !isStaticMethod) &&
Expand Down

0 comments on commit a8a40d9

Please sign in to comment.