clang API Documentation

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

#include <Expr.h>

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

List of all members.

Public Member Functions

 ConditionalOperator (Expr *cond, SourceLocation QLoc, Expr *lhs, SourceLocation CLoc, Expr *rhs, QualType t, ExprValueKind VK, ExprObjectKind OK)
 ConditionalOperator (EmptyShell Empty)
 Build an empty conditional operator.
ExprgetCond () const
ExprgetTrueExpr () const
ExprgetFalseExpr () const
ExprgetLHS () const
ExprgetRHS () const
SourceRange getSourceRange () const LLVM_READONLY
child_range children ()

Static Public Member Functions

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

Friends

class ASTStmtReader

Detailed Description

ConditionalOperator - The ?: ternary operator. The GNU "missing middle" extension is a BinaryConditionalOperator.

Definition at line 2995 of file Expr.h.


Constructor & Destructor Documentation

clang::ConditionalOperator::ConditionalOperator ( Expr cond,
SourceLocation  QLoc,
Expr lhs,
SourceLocation  CLoc,
Expr rhs,
QualType  t,
ExprValueKind  VK,
ExprObjectKind  OK 
) [inline]

Definition at line 3001 of file Expr.h.

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

Build an empty conditional operator.

Definition at line 3024 of file Expr.h.


Member Function Documentation

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

Reimplemented from clang::Stmt.

Definition at line 3052 of file Expr.h.

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

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3046 of file Expr.h.

References clang::Stmt::getStmtClass().

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

Definition at line 3049 of file Expr.h.

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

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3029 of file Expr.h.

Referenced by CheckICE(), and getSourceRange().

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

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3038 of file Expr.h.

Referenced by CheckICE(), and ClassifyInternal().

Expr* clang::ConditionalOperator::getLHS ( ) const [inline]

Definition at line 3040 of file Expr.h.

Referenced by EvalAddr(), EvalVal(), and clang::Expr::isUnusedResultAWarning().

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

Definition at line 3041 of file Expr.h.

Referenced by EvalAddr(), EvalVal(), getSourceRange(), and clang::Expr::isUnusedResultAWarning().

SourceRange clang::ConditionalOperator::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 3043 of file Expr.h.

References getCond(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), and getRHS().

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

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 3033 of file Expr.h.

Referenced by CheckICE(), and ClassifyInternal().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::AbstractConditionalOperator.

Definition at line 2999 of file Expr.h.


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