diff --git a/include/clad/Differentiator/BaseForwardModeVisitor.h b/include/clad/Differentiator/BaseForwardModeVisitor.h index 3de507d69..fa7c09ad6 100644 --- a/include/clad/Differentiator/BaseForwardModeVisitor.h +++ b/include/clad/Differentiator/BaseForwardModeVisitor.h @@ -102,6 +102,8 @@ class BaseForwardModeVisitor StmtDiff VisitCXXThisExpr(const clang::CXXThisExpr* CTE); StmtDiff VisitCXXNewExpr(const clang::CXXNewExpr* CNE); StmtDiff VisitCXXDeleteExpr(const clang::CXXDeleteExpr* CDE); + StmtDiff + VisitCXXScalarValueInitExpr(const clang::CXXScalarValueInitExpr* SVIE); StmtDiff VisitCXXStaticCastExpr(const clang::CXXStaticCastExpr* CSE); StmtDiff VisitCXXFunctionalCastExpr(const clang::CXXFunctionalCastExpr* FCE); StmtDiff VisitCXXBindTemporaryExpr(const clang::CXXBindTemporaryExpr* BTE); diff --git a/lib/Differentiator/BaseForwardModeVisitor.cpp b/lib/Differentiator/BaseForwardModeVisitor.cpp index bf8782f44..c53757261 100644 --- a/lib/Differentiator/BaseForwardModeVisitor.cpp +++ b/lib/Differentiator/BaseForwardModeVisitor.cpp @@ -2283,6 +2283,11 @@ StmtDiff BaseForwardModeVisitor::VisitCXXStdInitializerListExpr( return Visit(ILE->getSubExpr()); } +StmtDiff BaseForwardModeVisitor::VisitCXXScalarValueInitExpr( + const CXXScalarValueInitExpr* SVIE) { + return {Clone(SVIE), Clone(SVIE)}; +} + clang::Expr* BaseForwardModeVisitor::BuildCustomDerivativeConstructorPFCall( const clang::CXXConstructExpr* CE, llvm::SmallVectorImpl& clonedArgs,