clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Friends
clang::TypeTraitExpr Class Reference

A type trait used in the implementation of various C++11 and Library TR1 trait templates. More...

#include <ExprCXX.h>

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

List of all members.

Public Types

typedef TypeSourceInfo ** arg_iterator
typedef TypeSourceInfo const
*const * 
arg_const_iterator

Public Member Functions

TypeTrait getTrait () const
 Determine which type trait this expression uses.
bool getValue () const
unsigned getNumArgs () const
 Determine the number of arguments to this type trait.
TypeSourceInfogetArg (unsigned I) const
 Retrieve the Ith argument.
ArrayRef< TypeSourceInfo * > getArgs () const
 Retrieve the argument types.
arg_iterator arg_begin ()
arg_iterator arg_end ()
arg_const_iterator arg_begin () const
arg_const_iterator arg_end () const
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static TypeTraitExprCreate (const ASTContext &C, QualType T, SourceLocation Loc, TypeTrait Kind, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc, bool Value)
 Create a new type trait expression.
static TypeTraitExprCreateDeserialized (const ASTContext &C, unsigned NumArgs)
static bool classof (const Stmt *T)

Friends

class ASTStmtReader
class ASTStmtWriter

Detailed Description

A type trait used in the implementation of various C++11 and Library TR1 trait templates.

   __is_pod(int) == true
   __is_enum(std::string) == false
   __is_trivially_constructible(vector<int>, int*, int*)

Definition at line 2070 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 2140 of file ExprCXX.h.

Definition at line 2132 of file ExprCXX.h.


Member Function Documentation

Definition at line 2133 of file ExprCXX.h.

Definition at line 2141 of file ExprCXX.h.

Definition at line 2136 of file ExprCXX.h.

References getNumArgs().

Definition at line 2142 of file ExprCXX.h.

References getNumArgs().

Reimplemented from clang::Stmt.

Definition at line 2154 of file ExprCXX.h.

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

Reimplemented from clang::Expr.

Definition at line 2149 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

TypeTraitExpr * TypeTraitExpr::Create ( const ASTContext C,
QualType  T,
SourceLocation  Loc,
TypeTrait  Kind,
ArrayRef< TypeSourceInfo * >  Args,
SourceLocation  RParenLoc,
bool  Value 
) [static]

Create a new type trait expression.

Definition at line 1521 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

Referenced by clang::Sema::BuildTypeTrait().

TypeTraitExpr * TypeTraitExpr::CreateDeserialized ( const ASTContext C,
unsigned  NumArgs 
) [static]

Definition at line 1532 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

Retrieve the Ith argument.

Definition at line 2122 of file ExprCXX.h.

References getArgs(), and getNumArgs().

ArrayRef<TypeSourceInfo *> clang::TypeTraitExpr::getArgs ( ) const [inline]

Retrieve the argument types.

Definition at line 2128 of file ExprCXX.h.

References getNumArgs().

Referenced by getArg().

Reimplemented from clang::Stmt.

Definition at line 2147 of file ExprCXX.h.

Reimplemented from clang::Stmt.

Definition at line 2146 of file ExprCXX.h.

Determine the number of arguments to this type trait.

Definition at line 2119 of file ExprCXX.h.

References clang::Stmt::TypeTraitExprBits.

Referenced by arg_end(), getArg(), and getArgs().

Determine which type trait this expression uses.

Definition at line 2109 of file ExprCXX.h.

References clang::Stmt::TypeTraitExprBits.

Definition at line 2113 of file ExprCXX.h.

References clang::Expr::isValueDependent(), and clang::Stmt::TypeTraitExprBits.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 2156 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 2157 of file ExprCXX.h.


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