clang API Documentation

Public Member Functions | Static Public Member Functions
clang::ChooseExpr Class Reference

#include <Expr.h>

Inheritance diagram for clang::ChooseExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::ChooseExpr:
Collaboration graph
[legend]

List of all members.

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
ExprgetChosenSubExpr () const
ExprgetCond () const
void setCond (Expr *E)
ExprgetLHS () const
void setLHS (Expr *E)
ExprgetRHS () 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)

Detailed Description

ChooseExpr - GNU builtin-in function __builtin_choose_expr. This AST node is similar to the conditional operator (?:) in C, with the following exceptions:

Definition at line 3563 of file Expr.h.


Constructor & Destructor Documentation

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]

Definition at line 3569 of file Expr.h.

clang::ChooseExpr::ChooseExpr ( EmptyShell  Empty) [inline, explicit]

Build an empty __builtin_choose_expr.

Definition at line 3587 of file Expr.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 3629 of file Expr.h.

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().

Definition at line 3615 of file Expr.h.

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]
Expr* clang::ChooseExpr::getLHS ( ) const [inline]

Definition at line 3610 of file Expr.h.

Referenced by getChosenSubExpr(), print_block(), and clang::ento::ExprEngine::Visit().

Reimplemented from clang::Stmt.

Definition at line 3622 of file Expr.h.

Reimplemented from clang::Stmt.

Definition at line 3621 of file Expr.h.

Expr* clang::ChooseExpr::getRHS ( ) const [inline]

Definition at line 3612 of file Expr.h.

Referenced by getChosenSubExpr(), print_block(), and clang::ento::ExprEngine::Visit().

Definition at line 3618 of file Expr.h.

Definition at line 3598 of file Expr.h.

References getCond(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().

Referenced by isConditionTrue().

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().

Definition at line 3616 of file Expr.h.

void clang::ChooseExpr::setCond ( Expr E) [inline]

Definition at line 3609 of file Expr.h.

void clang::ChooseExpr::setIsConditionTrue ( bool  isTrue) [inline]

Definition at line 3596 of file Expr.h.

void clang::ChooseExpr::setLHS ( Expr E) [inline]

Definition at line 3611 of file Expr.h.

void clang::ChooseExpr::setRHS ( Expr E) [inline]

Definition at line 3613 of file Expr.h.

Definition at line 3619 of file Expr.h.


The documentation for this class was generated from the following file: