forked from OSchip/llvm-project
Move the CXXConstructExpr before the CXXTemporaryObjectExpr so that the temporary object expr can inherit from the construct expr. No functionality change.
llvm-svn: 69953
This commit is contained in:
parent
bb881d66f4
commit
c5e0337eb2
|
@ -379,6 +379,54 @@ public:
|
|||
virtual child_iterator child_end();
|
||||
};
|
||||
|
||||
|
||||
/// CXXConstructExpr - Represents a call to a C++ constructor.
|
||||
class CXXConstructExpr : public Expr {
|
||||
VarDecl *VD;
|
||||
CXXConstructorDecl *Constructor;
|
||||
|
||||
bool Elidable;
|
||||
|
||||
Stmt **Args;
|
||||
unsigned NumArgs;
|
||||
|
||||
CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T,
|
||||
CXXConstructorDecl *d, bool elidable,
|
||||
Expr **args, unsigned numargs);
|
||||
~CXXConstructExpr() { }
|
||||
|
||||
public:
|
||||
static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T,
|
||||
CXXConstructorDecl *D, bool Elidable,
|
||||
Expr **Args, unsigned NumArgs);
|
||||
|
||||
void Destroy(ASTContext &C);
|
||||
|
||||
const VarDecl* getVarDecl() const { return VD; }
|
||||
const CXXConstructorDecl* getConstructor() const { return Constructor; }
|
||||
|
||||
typedef ExprIterator arg_iterator;
|
||||
typedef ConstExprIterator const_arg_iterator;
|
||||
|
||||
arg_iterator arg_begin() { return Args; }
|
||||
arg_iterator arg_end() { return Args + NumArgs; }
|
||||
const_arg_iterator arg_begin() const { return Args; }
|
||||
const_arg_iterator arg_end() const { return Args + NumArgs; }
|
||||
|
||||
unsigned getNumArgs() const { return NumArgs; }
|
||||
|
||||
virtual SourceRange getSourceRange() const { return SourceRange(); }
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == CXXConstructExprClass;
|
||||
}
|
||||
static bool classof(const CXXConstructExpr *) { return true; }
|
||||
|
||||
// Iterators
|
||||
virtual child_iterator child_begin();
|
||||
virtual child_iterator child_end();
|
||||
};
|
||||
|
||||
/// CXXFunctionalCastExpr - Represents an explicit C++ type conversion
|
||||
/// that uses "functional" notion (C++ [expr.type.conv]). Example: @c
|
||||
/// x = int(0.5);
|
||||
|
@ -890,53 +938,6 @@ public:
|
|||
virtual StmtIterator child_end();
|
||||
};
|
||||
|
||||
/// CXXConstructExpr - Represents a call to a C++ constructor.
|
||||
class CXXConstructExpr : public Expr {
|
||||
VarDecl *VD;
|
||||
CXXConstructorDecl *Constructor;
|
||||
|
||||
bool Elidable;
|
||||
|
||||
Stmt **Args;
|
||||
unsigned NumArgs;
|
||||
|
||||
CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T,
|
||||
CXXConstructorDecl *d, bool elidable,
|
||||
Expr **args, unsigned numargs);
|
||||
~CXXConstructExpr() { }
|
||||
|
||||
public:
|
||||
static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T,
|
||||
CXXConstructorDecl *D, bool Elidable,
|
||||
Expr **Args, unsigned NumArgs);
|
||||
|
||||
void Destroy(ASTContext &C);
|
||||
|
||||
const VarDecl* getVarDecl() const { return VD; }
|
||||
const CXXConstructorDecl* getConstructor() const { return Constructor; }
|
||||
|
||||
typedef ExprIterator arg_iterator;
|
||||
typedef ConstExprIterator const_arg_iterator;
|
||||
|
||||
arg_iterator arg_begin() { return Args; }
|
||||
arg_iterator arg_end() { return Args + NumArgs; }
|
||||
const_arg_iterator arg_begin() const { return Args; }
|
||||
const_arg_iterator arg_end() const { return Args + NumArgs; }
|
||||
|
||||
unsigned getNumArgs() const { return NumArgs; }
|
||||
|
||||
virtual SourceRange getSourceRange() const { return SourceRange(); }
|
||||
|
||||
static bool classof(const Stmt *T) {
|
||||
return T->getStmtClass() == CXXConstructExprClass;
|
||||
}
|
||||
static bool classof(const CXXConstructExpr *) { return true; }
|
||||
|
||||
// Iterators
|
||||
virtual child_iterator child_begin();
|
||||
virtual child_iterator child_end();
|
||||
};
|
||||
|
||||
/// CXXDestroyExpr - Represents an implicit call to a C++ destructor.
|
||||
class CXXDestroyExpr : public Expr {
|
||||
VarDecl *VD;
|
||||
|
|
Loading…
Reference in New Issue