clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::BinaryConditionalOperator Class Reference

#include <Expr.h>

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

List of all members.

Public Member Functions

 BinaryConditionalOperator (Expr *common, OpaqueValueExpr *opaqueValue, Expr *cond, Expr *lhs, Expr *rhs, SourceLocation qloc, SourceLocation cloc, QualType t, ExprValueKind VK, ExprObjectKind OK)
 BinaryConditionalOperator (EmptyShell Empty)
 Build an empty conditional operator.
ExprgetCommon () const
 getCommon - Return the common expression, written to the left of the condition. The opaque value will be bound to the result of this expression.
OpaqueValueExprgetOpaqueValue () const
 getOpaqueValue - Return the opaque value placeholder.
ExprgetCond () const
 getCond - Return the condition expression; this is defined in terms of the opaque value.
ExprgetTrueExpr () const
 getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; this is defined in terms of the opaque value.
ExprgetFalseExpr () const
 getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false; this is defined in terms of the opaque value.
SourceRange getSourceRange () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const BinaryConditionalOperator *)

Friends

class ASTStmtReader

Detailed Description

BinaryConditionalOperator - The GNU extension to the conditional operator which allows the middle operand to be omitted.

This is a different expression kind on the assumption that almost every client ends up needing to know that these are different.

Definition at line 3062 of file Expr.h.


Constructor & Destructor Documentation

clang::BinaryConditionalOperator::BinaryConditionalOperator ( Expr common,
OpaqueValueExpr opaqueValue,
Expr cond,
Expr lhs,
Expr rhs,
SourceLocation  qloc,
SourceLocation  cloc,
QualType  t,
ExprValueKind  VK,
ExprObjectKind  OK 
) [inline]

Definition at line 3075 of file Expr.h.

References clang::OpaqueValueExpr::getSourceExpr().

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

Build an empty conditional operator.

Definition at line 3096 of file Expr.h.


Member Function Documentation

child_range clang::BinaryConditionalOperator::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 3134 of file Expr.h.

static bool clang::BinaryConditionalOperator::classof ( const Stmt T) [inline, static]

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3128 of file Expr.h.

References clang::Stmt::getStmtClass().

static bool clang::BinaryConditionalOperator::classof ( const BinaryConditionalOperator ) [inline, static]

Definition at line 3131 of file Expr.h.

Expr* clang::BinaryConditionalOperator::getCommon ( ) const [inline]

getCommon - Return the common expression, written to the left of the condition. The opaque value will be bound to the result of this expression.

Definition at line 3102 of file Expr.h.

Referenced by CheckICE(), getSourceRange(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::OpaqueValueMapping().

Expr* clang::BinaryConditionalOperator::getCond ( ) const [inline]

getCond - Return the condition expression; this is defined in terms of the opaque value.

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3109 of file Expr.h.

Expr* clang::BinaryConditionalOperator::getFalseExpr ( ) const [inline]

getFalseExpr - Return the subexpression which will be evaluated if the condnition evaluates to false; this is defined in terms of the opaque value.

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3121 of file Expr.h.

Referenced by CheckICE(), ClassifyInternal(), and getSourceRange().

OpaqueValueExpr* clang::BinaryConditionalOperator::getOpaqueValue ( ) const [inline]

getOpaqueValue - Return the opaque value placeholder.

Definition at line 3105 of file Expr.h.

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMapping::OpaqueValueMapping().

SourceRange clang::BinaryConditionalOperator::getSourceRange ( ) const [inline]

SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.

Reimplemented from clang::Stmt.

Definition at line 3125 of file Expr.h.

References getCommon(), getFalseExpr(), clang::Stmt::getLocEnd(), and clang::Stmt::getLocStart().

Expr* clang::BinaryConditionalOperator::getTrueExpr ( ) const [inline]

getTrueExpr - Return the subexpression which will be evaluated if the condition evaluates to true; this is defined in terms of the opaque value.

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3114 of file Expr.h.

Referenced by ClassifyInternal().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3073 of file Expr.h.


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