class ChooseExpr

Declaration

class ChooseExpr : public Expr { /* full declaration omitted */ };

Description

ChooseExpr - GNU builtin-in function __builtin_choose_expr. This AST node is similar to the conditional operator (?:) in C, with the following exceptions: - the test expression must be a integer constant expression. - the expression returned acts like the chosen subexpression in every visible way: the type is the same as that of the chosen subexpression, and all predicates (whether it's an l-value, whether it's an integer constant expression, etc.) return the same result as for the chosen sub-expression.

Declared at: clang/include/clang/AST/Expr.h:4524

Inherits from: Expr

Member Variables

private clang::Stmt* [3] SubExprs
private clang::SourceLocation BuiltinLoc
private clang::SourceLocation RParenLoc
private bool CondIsTrue

Inherited from Stmt:

protected

Method Overview

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

ChooseExpr(clang::Stmt::EmptyShell Empty)

Description

Build an empty __builtin_choose_expr.

Declared at: clang/include/clang/AST/Expr.h:4543

Parameters

clang::Stmt::EmptyShell Empty

ChooseExpr(clang::SourceLocation BLoc,
           clang::Expr* cond,
           clang::Expr* lhs,
           clang::Expr* rhs,
           clang::QualType t,
           clang::ExprValueKind VK,
           clang::ExprObjectKind OK,
           clang::SourceLocation RP,
           bool condIsTrue)

Declared at: clang/include/clang/AST/Expr.h:4530

Parameters

clang::SourceLocation BLoc
clang::Expr* cond
clang::Expr* lhs
clang::Expr* rhs
clang::QualType t
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::SourceLocation RP
bool condIsTrue

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:4588

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:4585

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Expr.h:4580

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:4577

clang::SourceLocation getBuiltinLoc() const

Declared at: clang/include/clang/AST/Expr.h:4571

clang::Expr* getChosenSubExpr() const

Description

getChosenSubExpr - Return the subexpression chosen according to the condition.

Declared at: clang/include/clang/AST/Expr.h:4560

clang::Expr* getCond() const

Declared at: clang/include/clang/AST/Expr.h:4564

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:4578

clang::Expr* getLHS() const

Declared at: clang/include/clang/AST/Expr.h:4566

clang::Expr* getRHS() const

Declared at: clang/include/clang/AST/Expr.h:4568

clang::SourceLocation getRParenLoc() const

Declared at: clang/include/clang/AST/Expr.h:4574

bool isConditionDependent() const

Declared at: clang/include/clang/AST/Expr.h:4554

bool isConditionTrue() const

Description

isConditionTrue - Return whether the condition is true (i.e. not equal to zero).

Declared at: clang/include/clang/AST/Expr.h:4547

void setBuiltinLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Expr.h:4572

Parameters

clang::SourceLocation L

void setCond(clang::Expr* E)

Declared at: clang/include/clang/AST/Expr.h:4565

Parameters

clang::Expr* E

void setIsConditionTrue(bool isTrue)

Declared at: clang/include/clang/AST/Expr.h:4552

Parameters

bool isTrue

void setLHS(clang::Expr* E)

Declared at: clang/include/clang/AST/Expr.h:4567

Parameters

clang::Expr* E

void setRHS(clang::Expr* E)

Declared at: clang/include/clang/AST/Expr.h:4569

Parameters

clang::Expr* E

void setRParenLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Expr.h:4575

Parameters

clang::SourceLocation L