clang API Documentation
#include <Expr.h>
Public Member Functions | |
ChooseExpr (SourceLocation BLoc, Expr *cond, Expr *lhs, Expr *rhs, QualType t, ExprValueKind VK, ExprObjectKind OK, SourceLocation RP, bool condIsTrue, bool TypeDependent, bool ValueDependent) | |
ChooseExpr (EmptyShell Empty) | |
Build an empty __builtin_choose_expr. | |
bool | isConditionTrue () const |
void | setIsConditionTrue (bool isTrue) |
bool | isConditionDependent () const |
Expr * | getChosenSubExpr () const |
Expr * | getCond () const |
void | setCond (Expr *E) |
Expr * | getLHS () const |
void | setLHS (Expr *E) |
Expr * | getRHS () const |
void | setRHS (Expr *E) |
SourceLocation | getBuiltinLoc () const |
void | setBuiltinLoc (SourceLocation L) |
SourceLocation | getRParenLoc () const |
void | setRParenLoc (SourceLocation L) |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
ChooseExpr - GNU builtin-in function __builtin_choose_expr. This AST node is similar to the conditional operator (?:) in C, with the following exceptions:
clang::ChooseExpr::ChooseExpr | ( | SourceLocation | BLoc, |
Expr * | cond, | ||
Expr * | lhs, | ||
Expr * | rhs, | ||
QualType | t, | ||
ExprValueKind | VK, | ||
ExprObjectKind | OK, | ||
SourceLocation | RP, | ||
bool | condIsTrue, | ||
bool | TypeDependent, | ||
bool | ValueDependent | ||
) | [inline] |
clang::ChooseExpr::ChooseExpr | ( | EmptyShell | Empty | ) | [inline, explicit] |
child_range clang::ChooseExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
static bool clang::ChooseExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 3624 of file Expr.h.
References clang::Stmt::getStmtClass().
SourceLocation clang::ChooseExpr::getBuiltinLoc | ( | ) | const [inline] |
Expr* clang::ChooseExpr::getChosenSubExpr | ( | ) | const [inline] |
getChosenSubExpr - Return the subexpression chosen according to the condition.
Definition at line 3604 of file Expr.h.
References getLHS(), getRHS(), and isConditionTrue().
Referenced by clang::EvaluatedExprVisitor< ImplClass >::VisitChooseExpr().
Expr* clang::ChooseExpr::getCond | ( | ) | const [inline] |
Definition at line 3608 of file Expr.h.
Referenced by isConditionDependent(), and clang::EvaluatedExprVisitor< ImplClass >::VisitChooseExpr().
Expr* clang::ChooseExpr::getLHS | ( | ) | const [inline] |
Definition at line 3610 of file Expr.h.
Referenced by getChosenSubExpr(), print_block(), and clang::ento::ExprEngine::Visit().
SourceLocation clang::ChooseExpr::getLocEnd | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
SourceLocation clang::ChooseExpr::getLocStart | ( | ) | const [inline] |
Reimplemented from clang::Stmt.
Expr* clang::ChooseExpr::getRHS | ( | ) | const [inline] |
Definition at line 3612 of file Expr.h.
Referenced by getChosenSubExpr(), print_block(), and clang::ento::ExprEngine::Visit().
SourceLocation clang::ChooseExpr::getRParenLoc | ( | ) | const [inline] |
bool clang::ChooseExpr::isConditionDependent | ( | ) | const [inline] |
Definition at line 3598 of file Expr.h.
References getCond(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by isConditionTrue().
bool clang::ChooseExpr::isConditionTrue | ( | ) | const [inline] |
isConditionTrue - Return whether the condition is true (i.e. not equal to zero).
Definition at line 3591 of file Expr.h.
References isConditionDependent().
Referenced by getChosenSubExpr().
void clang::ChooseExpr::setBuiltinLoc | ( | SourceLocation | L | ) | [inline] |
void clang::ChooseExpr::setCond | ( | Expr * | E | ) | [inline] |
void clang::ChooseExpr::setIsConditionTrue | ( | bool | isTrue | ) | [inline] |
void clang::ChooseExpr::setLHS | ( | Expr * | E | ) | [inline] |
void clang::ChooseExpr::setRHS | ( | Expr * | E | ) | [inline] |
void clang::ChooseExpr::setRParenLoc | ( | SourceLocation | L | ) | [inline] |