Skip to content

Commit

Permalink
Apply suggestions from clang-tidy
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
vgvassilev and github-actions[bot] authored Nov 2, 2023
1 parent fde55c9 commit 44faf41
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/clad/Differentiator/StmtClone.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace utils {

/// Cloning types is necessary since VariableArrayType
/// store a pointer to their size expression.
clang::QualType CloneType(const clang::QualType T);
clang::QualType CloneType(clang::QualType T);

// visitor part (not for public use)
// Stmt.def could be used if ABSTR_STMT is introduced
Expand Down
2 changes: 1 addition & 1 deletion include/clad/Differentiator/VisitorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ namespace clad {
clang::Expr* Clone(const clang::Expr* E);
/// Cloning types is necessary since VariableArrayType
/// store a pointer to their size expression.
clang::QualType CloneType(const clang::QualType T);
clang::QualType CloneType(clang::QualType T);
};
} // end namespace clad

Expand Down
8 changes: 4 additions & 4 deletions lib/Differentiator/StmtClone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ Stmt* StmtClone::VisitMemberExpr(MemberExpr* Node) {
return result;
}
DEFINE_CLONE_EXPR(CompoundLiteralExpr, (Node->getLParenLoc(), Node->getTypeSourceInfo(), CloneType(Node->getType()), Node->getValueKind(), Clone(Node->getInitializer()), Node->isFileScope()))
DEFINE_CREATE_EXPR(ImplicitCastExpr, (Ctx, CloneType(Node->getType()), Node->getCastKind(), Clone(Node->getSubExpr()), 0, Node->getValueKind() /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node) ))
DEFINE_CREATE_EXPR(CStyleCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), 0 /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node), Node->getTypeInfoAsWritten(), Node->getLParenLoc(), Node->getRParenLoc()))
DEFINE_CREATE_EXPR(CXXStaticCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), 0, Node->getTypeInfoAsWritten() /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(CXXDynamicCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), 0, Node->getTypeInfoAsWritten(), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(ImplicitCastExpr, (Ctx, CloneType(Node->getType()), Node->getCastKind(), Clone(Node->getSubExpr()), nullptr, Node->getValueKind() /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node) ))
DEFINE_CREATE_EXPR(CStyleCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), nullptr /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node), Node->getTypeInfoAsWritten(), Node->getLParenLoc(), Node->getRParenLoc()))
DEFINE_CREATE_EXPR(CXXStaticCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), nullptr, Node->getTypeInfoAsWritten() /*EP*/CLAD_COMPAT_CLANG12_CastExpr_GetFPO(Node), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(CXXDynamicCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), nullptr, Node->getTypeInfoAsWritten(), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(CXXReinterpretCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Node->getCastKind(), Clone(Node->getSubExpr()), 0, Node->getTypeInfoAsWritten(), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(CXXConstCastExpr, (Ctx, CloneType(Node->getType()), Node->getValueKind(), Clone(Node->getSubExpr()), Node->getTypeInfoAsWritten(), Node->getOperatorLoc(), Node->getRParenLoc(), Node->getAngleBrackets()))
DEFINE_CREATE_EXPR(CXXConstructExpr, (Ctx, CloneType(Node->getType()), Node->getLocation(), Node->getConstructor(), Node->isElidable(), clad_compat::makeArrayRef(Node->getArgs(), Node->getNumArgs()), Node->hadMultipleCandidates(), Node->isListInitialization(), Node->isStdInitListInitialization(), Node->requiresZeroInitialization(), Node->getConstructionKind(), Node->getParenOrBraceRange()))
Expand Down

0 comments on commit 44faf41

Please sign in to comment.