MultiTemplateParamsArg TemplateParameterLists,
ExprTy *BitfieldWidth,
ExprTy *Init,
+ bool IsDefinition,
bool Deleted = false) {
return DeclPtrTy();
}
FnD = Actions.ActOnFriendFunctionDecl(CurScope, D, true, move(TemplateParams));
else // FIXME: pass template information through
FnD = Actions.ActOnCXXMemberDeclarator(CurScope, AS, D,
- move(TemplateParams), 0, 0);
+ move(TemplateParams), 0, 0,
+ /*IsDefinition*/true);
HandleMemberFunctionDefaultArgs(D, FnD);
move(TemplateParams),
BitfieldSize.release(),
Init.release(),
+ /*IsDefinition*/Deleted,
Deleted);
}
if (ThisDecl)
Declarator &D,
MultiTemplateParamsArg TemplateParameterLists,
ExprTy *BitfieldWidth,
- ExprTy *Init,
+ ExprTy *Init, bool IsDefinition,
bool Deleted = false);
virtual MemInitResult ActOnMemInitializer(DeclPtrTy ConstructorD,
Sema::DeclPtrTy
Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
MultiTemplateParamsArg TemplateParameterLists,
- ExprTy *BW, ExprTy *InitExpr, bool Deleted) {
+ ExprTy *BW, ExprTy *InitExpr, bool IsDefinition,
+ bool Deleted) {
const DeclSpec &DS = D.getDeclSpec();
DeclarationName Name = GetNameForDeclarator(D);
Expr *BitWidth = static_cast<Expr*>(BW);
AS);
assert(Member && "HandleField never returns null");
} else {
- Member = HandleDeclarator(S, D, move(TemplateParameterLists), false)
+ Member = HandleDeclarator(S, D, move(TemplateParameterLists), IsDefinition)
.getAs<Decl>();
if (!Member) {
if (BitWidth) DeleteExpr(BitWidth);
// PR5415 - don't hang!
struct S
{
- void f(); // expected-note 2 {{previous declaration}}
- // FIXME: the out-of-line error shouldn't be there
- void S::f() {} // expected-error {{class member cannot be redeclared}} expected-error {{out-of-line}} expected-note {{previous definition}}
+ void f(); // expected-note 1 {{previous declaration}}
+ void S::f() {} // expected-error {{class member cannot be redeclared}} expected-note {{previous declaration}} expected-note {{previous definition}}
void f() {} // expected-error {{class member cannot be redeclared}} expected-error {{redefinition}}
};