forked from OSchip/llvm-project
Apparently empty names are allowed here.
llvm-svn: 157117
This commit is contained in:
parent
1458c1c009
commit
365082dbfa
|
@ -1504,15 +1504,16 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
|
|||
Decl *Member;
|
||||
if (isInstField) {
|
||||
CXXScopeSpec &SS = D.getCXXScopeSpec();
|
||||
IdentifierInfo *II = Name.getAsIdentifierInfo();
|
||||
|
||||
// Data members must have identifiers for names.
|
||||
if (!II) {
|
||||
if (!Name.isIdentifier()) {
|
||||
Diag(Loc, diag::err_bad_variable_name)
|
||||
<< Name;
|
||||
return 0;
|
||||
}
|
||||
|
||||
IdentifierInfo *II = Name.getAsIdentifierInfo();
|
||||
|
||||
// Member field could not be with "template" keyword.
|
||||
// So TemplateParameterLists should be empty in this case.
|
||||
if (TemplateParameterLists.size()) {
|
||||
|
|
|
@ -1399,13 +1399,14 @@ HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT,
|
|||
const ObjCInterfaceType *IFaceT = OPT->getInterfaceType();
|
||||
ObjCInterfaceDecl *IFace = IFaceT->getDecl();
|
||||
|
||||
IdentifierInfo *Member = MemberName.getAsIdentifierInfo();
|
||||
if (!Member) {
|
||||
if (!MemberName.isIdentifier()) {
|
||||
Diag(MemberLoc, diag::err_invalid_property_name)
|
||||
<< MemberName << QualType(OPT, 0);
|
||||
return ExprError();
|
||||
}
|
||||
|
||||
IdentifierInfo *Member = MemberName.getAsIdentifierInfo();
|
||||
|
||||
SourceRange BaseRange = Super? SourceRange(SuperLoc)
|
||||
: BaseExpr->getSourceRange();
|
||||
if (RequireCompleteType(MemberLoc, OPT->getPointeeType(),
|
||||
|
|
Loading…
Reference in New Issue