bool hasDeclaratorForAnonDecl() const {
return dyn_cast_or_null<DeclaratorDecl>(
- NamedDeclOrQualifier.get<NamedDecl *>());
+ NamedDeclOrQualifier.dyn_cast<NamedDecl *>());
}
DeclaratorDecl *getDeclaratorForAnonDecl() const {
- return hasExtInfo() ? nullptr : dyn_cast_or_null<DeclaratorDecl>(
- NamedDeclOrQualifier.get<NamedDecl *>());
+ return hasExtInfo() ? nullptr
+ : dyn_cast_or_null<DeclaratorDecl>(
+ NamedDeclOrQualifier.dyn_cast<NamedDecl *>());
}
TypedefNameDecl *getTypedefNameForAnonDecl() const {
- return hasExtInfo() ? nullptr : dyn_cast_or_null<TypedefNameDecl>(
- NamedDeclOrQualifier.get<NamedDecl *>());
+ return hasExtInfo() ? nullptr
+ : dyn_cast_or_null<TypedefNameDecl>(
+ NamedDeclOrQualifier.dyn_cast<NamedDecl *>());
}
void setDeclaratorForAnonDecl(DeclaratorDecl *DD) { NamedDeclOrQualifier = DD; }
// CheckMemberSpecialization, below.
if (!isExplicitSpecialization &&
(TUK == TUK_Definition || TUK == TUK_Declaration) &&
- diagnoseQualifiedDeclaration(SS, DC, OrigName, NameLoc))
+ diagnoseQualifiedDeclaration(SS, DC, OrigName, Loc))
Invalid = true;
New->setQualifierInfo(SS.getWithLocInContext(Context));
template<typename T> struct NS::Y { }; // expected-warning{{extra qualification on member 'Y'}}
template<typename T> void NS::wibble(T) { } // expected-warning{{extra qualification on member 'wibble'}}
}
+
+// expected-warning@+1{{extra qualification on member}}
+struct ::{} a; // expected-error{{expected identifier}}