From e9cf25d884b5c02365fa11037980506d6374cce4 Mon Sep 17 00:00:00 2001 From: kchristin Date: Tue, 24 Sep 2024 13:21:47 +0300 Subject: [PATCH] Fix clang-tidy comments --- lib/Differentiator/ReverseModeVisitor.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Differentiator/ReverseModeVisitor.cpp b/lib/Differentiator/ReverseModeVisitor.cpp index e6c720348..f24a657f0 100644 --- a/lib/Differentiator/ReverseModeVisitor.cpp +++ b/lib/Differentiator/ReverseModeVisitor.cpp @@ -1493,9 +1493,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, m_Context.getTranslationUnitDecl()); FunctionDecl* atomicAddFunc = nullptr; - for (LookupResult::iterator it = lookupResult.begin(); - it != lookupResult.end(); it++) { - NamedDecl* decl = *it; + for (auto decl : lookupResult) { // FIXME: check for underlying types of the pointers if (dyn_cast(decl)->getReturnType() == result->getType()) { @@ -2314,9 +2312,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, m_Context.getTranslationUnitDecl()); FunctionDecl* atomicAddFunc = nullptr; - for (LookupResult::iterator it = lookupResult.begin(); - it != lookupResult.end(); it++) { - NamedDecl* decl = *it; + for (auto decl : lookupResult) { // FIXME: check for underlying types of the pointers if (dyn_cast(decl)->getReturnType() == derivedE->getType()) {