/// FinalizeDeclaratorGroup - After a sequence of declarators are parsed, this
/// gives the actions implementation a chance to process the group as a whole.
- virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group,
+ virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec& DS,
+ DeclPtrTy *Group,
unsigned NumDecls) {
return DeclGroupPtrTy();
}
/// FinalizeDeclaratorGroup - After a sequence of declarators are parsed,
/// this gives the actions implementation a chance to process the group as
/// a whole.
- virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group,
+ virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec& DS,
+ DeclPtrTy *Group,
unsigned NumDecls) {
Out << __FUNCTION__ << "\n";
return DeclGroupPtrTy();
ParseDeclarator(D);
}
- return Actions.FinalizeDeclaratorGroup(CurScope, DeclsInGroup.data(),
+ return Actions.FinalizeDeclaratorGroup(CurScope, D.getDeclSpec(),
+ DeclsInGroup.data(),
DeclsInGroup.size());
}
if (Tok.is(tok::semi)) {
ConsumeToken();
- Actions.FinalizeDeclaratorGroup(CurScope, DeclsInGroup.data(),
+ Actions.FinalizeDeclaratorGroup(CurScope, DS, DeclsInGroup.data(),
DeclsInGroup.size());
return;
}
void AddInitializerToDecl(DeclPtrTy dcl, ExprArg init, bool DirectInit);
void ActOnUninitializedDecl(DeclPtrTy dcl);
virtual void SetDeclDeleted(DeclPtrTy dcl, SourceLocation DelLoc);
- virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group,
+ virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
+ DeclPtrTy *Group,
unsigned NumDecls);
virtual void ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D,
SourceLocation LocAfterDecls);
}
}
-Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group,
+Sema::DeclGroupPtrTy Sema::FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS,
+ DeclPtrTy *Group,
unsigned NumDecls) {
llvm::SmallVector<Decl*, 8> Decls;
-
+
+ if (DS.isTypeSpecOwned())
+ Decls.push_back((Decl*)DS.getTypeRep());
+
for (unsigned i = 0; i != NumDecls; ++i)
if (Decl *D = Group[i].getAs<Decl>())
Decls.push_back(D);