15 #ifndef LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H
16 #define LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H
29 template<
template <
typename>
class Ptr,
typename ImplClass>
35 #define PTR(CLASS) typename Ptr<CLASS>::type
86 return static_cast<ImplClass*>(
this)->VisitExpr(CE);
101 for (
auto *SubStmt : S->children())
103 this->
Visit(SubStmt);
110 template<
typename ImplClass>
119 template<
typename ImplClass>
129 #endif // LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H
const ASTContext & Context
EvaluatedExprVisitor - This class visits 'Expr *'s.
bool isResultDependent() const
Whether this generic selection is result-dependent.
Expr * getInit() const
Retrieve the initializer value.
const Expr * getResultExpr() const
Defines the clang::Expr interface and subclasses for C++ expressions.
void VisitDesignatedInitExpr(PTR(DesignatedInitExpr) E)
Represents a C99 designated initializer expression.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool isPotentiallyEvaluated() const
Expr * getChosenSubExpr() const
void VisitBlockExpr(PTR(BlockExpr) E)
capture_init_iterator capture_init_end() const
Retrieve the iterator pointing one past the last initialization argument for this lambda expression...
Expr * getExprOperand() const
bool isValueDependent() const
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
capture_init_iterator capture_init_begin() const
Retrieve the first initialization argument for this lambda expression (which initializes the first ca...
EvaluatedExprVisitor(const ASTContext &Context)
EvaluatedExprVisitorBase(const ASTContext &Context)
void VisitGenericSelectionExpr(PTR(GenericSelectionExpr) E)
ConstEvaluatedExprVisitor(const ASTContext &Context)
void VisitCXXTypeidExpr(PTR(CXXTypeidExpr) E)
void VisitCallExpr(PTR(CallExpr) CE)
void VisitDeclRefExpr(PTR(DeclRefExpr) E)
void VisitExpressionTraitExpr(PTR(ExpressionTraitExpr) E)
bool isUnevaluatedBuiltinCall(const ASTContext &Ctx) const
Returns true if this is a call to a builtin which does not evaluate side-effects within its arguments...
void VisitLambdaExpr(PTR(LambdaExpr) LE)
void VisitCXXNoexceptExpr(PTR(CXXNoexceptExpr) E)
An expression trait intrinsic.
Represents a C11 generic selection.
void VisitUnaryExprOrTypeTraitExpr(PTR(UnaryExprOrTypeTraitExpr) E)
ConstEvaluatedExprVisitor - This class visits 'const Expr *'s.
void VisitCXXUuidofExpr(PTR(CXXUuidofExpr) E)
Represents a C++11 noexcept expression (C++ [expr.unary.noexcept]).
Given a potentially-evaluated expression, this visitor visits all of its potentially-evaluated subexp...
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
void VisitMemberExpr(PTR(MemberExpr) E)
void VisitChooseExpr(PTR(ChooseExpr) E)
A reference to a declared variable, function, enum, etc. [C99 6.5.1p2].
void VisitOffsetOfExpr(PTR(OffsetOfExpr) E)
void VisitStmt(PTR(Stmt) S)
The basis case walks all of the children of the statement or expression, assuming they are all potent...