}
else if (FieldType->isReferenceType()) {
Diag(CurrentLocation, diag::err_unintialized_member)
- << Context.getTagDeclType(ClassDecl) << 0 << (*Field)->getNameAsCString();
+ << Context.getTagDeclType(ClassDecl) << 0 << Field->getDeclName();
Diag((*Field)->getLocation(), diag::note_declared_at);
err = true;
}
else if (FieldType.isConstQualified()) {
Diag(CurrentLocation, diag::err_unintialized_member)
- << Context.getTagDeclType(ClassDecl) << 1 << (*Field)->getNameAsCString();
+ << Context.getTagDeclType(ClassDecl) << 1 << Field->getDeclName();
Diag((*Field)->getLocation(), diag::note_declared_at);
err = true;
}
};
X4 x4; // expected-error {{cannot define the implicit default constructor for 'struct X4', because base class 'struct X2' does not have any default constructor}} \
- // expected-error {{cannot define the implicit default constructor for 'struct X4', because reference member rx2 cannot be default-initialized}}
+ // expected-error {{cannot define the implicit default constructor for 'struct X4', because reference member 'rx2' cannot be default-initialized}}
struct Y1 { // has no implicit default constructor
volatile int v1;
};
-Z1 z1; // expected-error {{cannot define the implicit default constructor for 'struct Z1', because reference member z cannot be default-initialized}} \
- // expected-error {{cannot define the implicit default constructor for 'struct Z1', because const member c1 cannot be default-initialized}}
+Z1 z1; // expected-error {{cannot define the implicit default constructor for 'struct Z1', because reference member 'z' cannot be default-initialized}} \
+ // expected-error {{cannot define the implicit default constructor for 'struct Z1', because const member 'c1' cannot be default-initialized}}