clang API Documentation

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

Describes an explicit type conversion that uses functional notion but could not be resolved because one or more arguments are type-dependent. More...

#include <ExprCXX.h>

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

List of all members.

Public Types

typedef Expr ** arg_iterator
typedef const Expr *const * const_arg_iterator

Public Member Functions

QualType getTypeAsWritten () const
 Retrieve the type that is being constructed, as specified in the source code.
TypeSourceInfogetTypeSourceInfo () const
 Retrieve the type source information for the type being constructed.
SourceLocation getLParenLoc () const
 Retrieve the location of the left parentheses ('(') that precedes the argument list.
void setLParenLoc (SourceLocation L)
SourceLocation getRParenLoc () const
 Retrieve the location of the right parentheses (')') that follows the argument list.
void setRParenLoc (SourceLocation L)
unsigned arg_size () const
 Retrieve the number of arguments.
arg_iterator arg_begin ()
arg_iterator arg_end ()
const_arg_iterator arg_begin () const
const_arg_iterator arg_end () const
ExprgetArg (unsigned I)
const ExprgetArg (unsigned I) const
void setArg (unsigned I, Expr *E)
SourceRange getSourceRange () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static CXXUnresolvedConstructExprCreate (ASTContext &C, TypeSourceInfo *Type, SourceLocation LParenLoc, Expr **Args, unsigned NumArgs, SourceLocation RParenLoc)
static CXXUnresolvedConstructExprCreateEmpty (ASTContext &C, unsigned NumArgs)
static bool classof (const Stmt *T)
static bool classof (const CXXUnresolvedConstructExpr *)

Friends

class ASTStmtReader

Detailed Description

Describes an explicit type conversion that uses functional notion but could not be resolved because one or more arguments are type-dependent.

The explicit type conversions expressed by CXXUnresolvedConstructExpr have the form T(a1, a2, ..., aN), where T is some type and a1, a2, ..., aN are values, and either T is a dependent type or one or more of the a's is type-dependent. For example, this would occur in a template such as:

   template<typename T, typename A1>
   inline T make_a(const A1& a1) {
     return T(a1);
   }

When the returned expression is instantiated, it may resolve to a constructor call, conversion function call, or some kind of type conversion.

Definition at line 2780 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 2836 of file ExprCXX.h.

Definition at line 2840 of file ExprCXX.h.


Member Function Documentation

arg_iterator clang::CXXUnresolvedConstructExpr::arg_begin ( ) [inline]

Definition at line 2837 of file ExprCXX.h.

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

const_arg_iterator clang::CXXUnresolvedConstructExpr::arg_begin ( ) const [inline]

Definition at line 2841 of file ExprCXX.h.

arg_iterator clang::CXXUnresolvedConstructExpr::arg_end ( ) [inline]

Definition at line 2838 of file ExprCXX.h.

References arg_begin(), and NumArgs.

const_arg_iterator clang::CXXUnresolvedConstructExpr::arg_end ( ) const [inline]

Definition at line 2844 of file ExprCXX.h.

References arg_begin(), and NumArgs.

unsigned clang::CXXUnresolvedConstructExpr::arg_size ( ) const [inline]

Retrieve the number of arguments.

Definition at line 2834 of file ExprCXX.h.

References NumArgs.

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

Reimplemented from clang::Stmt.

Definition at line 2871 of file ExprCXX.h.

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

Reimplemented from clang::Expr.

Definition at line 2865 of file ExprCXX.h.

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

Definition at line 2868 of file ExprCXX.h.

CXXUnresolvedConstructExpr * CXXUnresolvedConstructExpr::Create ( ASTContext C,
TypeSourceInfo Type,
SourceLocation  LParenLoc,
Expr **  Args,
unsigned  NumArgs,
SourceLocation  RParenLoc 
) [static]

Definition at line 1007 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

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

CXXUnresolvedConstructExpr * CXXUnresolvedConstructExpr::CreateEmpty ( ASTContext C,
unsigned  NumArgs 
) [static]

Definition at line 1020 of file ExprCXX.cpp.

References clang::ASTContext::Allocate().

Expr* clang::CXXUnresolvedConstructExpr::getArg ( unsigned  I) [inline]

Definition at line 2848 of file ExprCXX.h.

References arg_begin().

const Expr* clang::CXXUnresolvedConstructExpr::getArg ( unsigned  I) const [inline]

Definition at line 2853 of file ExprCXX.h.

References arg_begin().

SourceLocation clang::CXXUnresolvedConstructExpr::getLParenLoc ( ) const [inline]

Retrieve the location of the left parentheses ('(') that precedes the argument list.

Definition at line 2825 of file ExprCXX.h.

SourceLocation clang::CXXUnresolvedConstructExpr::getRParenLoc ( ) const [inline]

Retrieve the location of the right parentheses (')') that follows the argument list.

Definition at line 2830 of file ExprCXX.h.

SourceRange CXXUnresolvedConstructExpr::getSourceRange ( ) const

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 1027 of file ExprCXX.cpp.

References clang::TypeLoc::getBeginLoc(), and clang::TypeSourceInfo::getTypeLoc().

QualType clang::CXXUnresolvedConstructExpr::getTypeAsWritten ( ) const [inline]

Retrieve the type that is being constructed, as specified in the source code.

Definition at line 2817 of file ExprCXX.h.

References clang::TypeSourceInfo::getType().

TypeSourceInfo* clang::CXXUnresolvedConstructExpr::getTypeSourceInfo ( ) const [inline]

Retrieve the type source information for the type being constructed.

Definition at line 2821 of file ExprCXX.h.

void clang::CXXUnresolvedConstructExpr::setArg ( unsigned  I,
Expr E 
) [inline]

Definition at line 2858 of file ExprCXX.h.

References arg_begin().

void clang::CXXUnresolvedConstructExpr::setLParenLoc ( SourceLocation  L) [inline]

Definition at line 2826 of file ExprCXX.h.

void clang::CXXUnresolvedConstructExpr::setRParenLoc ( SourceLocation  L) [inline]

Definition at line 2831 of file ExprCXX.h.


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Definition at line 2802 of file ExprCXX.h.


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