Skip to content

Commit

Permalink
Support CXXScalarValueInitExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
PetroZarytskyi committed Aug 5, 2024
1 parent 149c3a9 commit 8ed1ec6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/clad/Differentiator/BaseForwardModeVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions lib/Differentiator/BaseForwardModeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<clang::Expr*>& clonedArgs,
Expand Down

0 comments on commit 8ed1ec6

Please sign in to comment.