From 6efcd08d14b10516ff080c6e71307ced01ca8582 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Mon, 10 Jun 2024 08:15:40 +0000 Subject: [PATCH] Fix an assertion when building the clad benchmarks with clang18 on osx. --- lib/Differentiator/VisitorBase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Differentiator/VisitorBase.cpp b/lib/Differentiator/VisitorBase.cpp index 18eb303fb..6fd70910d 100644 --- a/lib/Differentiator/VisitorBase.cpp +++ b/lib/Differentiator/VisitorBase.cpp @@ -280,10 +280,10 @@ namespace clad { (isa(ENoCasts) && cast(ENoCasts)->getNumArgs() == 2) || isa(ENoCasts) || - isa(ENoCasts)) - return m_Sema.ActOnParenExpr(noLoc, noLoc, E).get(); - else - return E; + isa(ENoCasts)) { + return m_Sema.ActOnParenExpr(E->getBeginLoc(), E->getEndLoc(), E).get(); + } + return E; } Expr* VisitorBase::StoreAndRef(Expr* E, llvm::StringRef prefix,