forked from OSchip/llvm-project
Give ImplicitParamDecl a public constructor so that it can be allocated on
the stack. llvm-svn: 126254
This commit is contained in:
parent
826308586c
commit
550d13aebb
|
@ -1034,16 +1034,18 @@ public:
|
|||
};
|
||||
|
||||
class ImplicitParamDecl : public VarDecl {
|
||||
protected:
|
||||
ImplicitParamDecl(Kind DK, DeclContext *DC, SourceLocation L,
|
||||
IdentifierInfo *Id, QualType Tw)
|
||||
: VarDecl(DK, DC, L, Id, Tw, /*TInfo=*/0, SC_None, SC_None) {
|
||||
setImplicit();
|
||||
}
|
||||
public:
|
||||
static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation L, IdentifierInfo *Id,
|
||||
QualType T);
|
||||
|
||||
ImplicitParamDecl(DeclContext *DC, SourceLocation loc,
|
||||
IdentifierInfo *name, QualType type)
|
||||
: VarDecl(ImplicitParam, DC, loc, name, type,
|
||||
/*tinfo*/ 0, SC_None, SC_None) {
|
||||
setImplicit();
|
||||
}
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
static bool classof(const ImplicitParamDecl *D) { return true; }
|
||||
static bool classof(const Decl *D) { return classofKind(D->getKind()); }
|
||||
|
|
|
@ -2211,8 +2211,10 @@ NamespaceDecl *NamespaceDecl::getNextNamespace() {
|
|||
}
|
||||
|
||||
ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation L, IdentifierInfo *Id, QualType T) {
|
||||
return new (C) ImplicitParamDecl(ImplicitParam, DC, L, Id, T);
|
||||
SourceLocation loc,
|
||||
IdentifierInfo *name,
|
||||
QualType type) {
|
||||
return new (C) ImplicitParamDecl(DC, loc, name, type);
|
||||
}
|
||||
|
||||
FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
|
||||
|
|
Loading…
Reference in New Issue