Make the CXXConstructExpr public and add a StmtClass to it. No functionality change.

llvm-svn: 69954
This commit is contained in:
Anders Carlsson 2009-04-24 05:04:04 +00:00
parent c5e0337eb2
commit 32ebd29b99
2 changed files with 9 additions and 7 deletions

View File

@ -379,7 +379,6 @@ public:
virtual child_iterator child_end();
};
/// CXXConstructExpr - Represents a call to a C++ constructor.
class CXXConstructExpr : public Expr {
VarDecl *VD;
@ -390,10 +389,12 @@ class CXXConstructExpr : public Expr {
Stmt **Args;
unsigned NumArgs;
CXXConstructExpr(ASTContext &C, VarDecl *vd, QualType T,
~CXXConstructExpr() { }
protected:
CXXConstructExpr(ASTContext &C, StmtClass SC, VarDecl *vd, QualType T,
CXXConstructorDecl *d, bool elidable,
Expr **args, unsigned numargs);
~CXXConstructExpr() { }
public:
static CXXConstructExpr *Create(ASTContext &C, VarDecl *VD, QualType T,

View File

@ -258,14 +258,15 @@ CXXConstructExpr *CXXConstructExpr::Create(ASTContext &C, VarDecl *VD,
QualType T, CXXConstructorDecl *D,
bool Elidable,
Expr **Args, unsigned NumArgs) {
return new (C) CXXConstructExpr(C, VD, T, D, Elidable, Args, NumArgs);
return new (C) CXXConstructExpr(C, CXXConstructExprClass, VD, T, D, Elidable,
Args, NumArgs);
}
CXXConstructExpr::CXXConstructExpr(ASTContext &C, VarDecl *vd,
CXXConstructExpr::CXXConstructExpr(ASTContext &C, StmtClass SC, VarDecl *vd,
QualType T, CXXConstructorDecl *D,
bool elidable,
Expr **args, unsigned numargs)
: Expr(CXXConstructExprClass, T,
: Expr(SC, T,
T->isDependentType(),
(T->isDependentType() ||
CallExpr::hasAnyValueDependentArguments(args, numargs))),