@@ -1502,15 +1502,6 @@ void Parser::ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs) {
1502
1502
}
1503
1503
}
1504
1504
1505
- void Parser::ParseNullabilityClassAttributes (ParsedAttributes &attrs) {
1506
- while (Tok.is (tok::kw__Nullable)) {
1507
- IdentifierInfo *AttrName = Tok.getIdentifierInfo ();
1508
- auto Kind = Tok.getKind ();
1509
- SourceLocation AttrNameLoc = ConsumeToken ();
1510
- attrs.addNew (AttrName, AttrNameLoc, nullptr , AttrNameLoc, nullptr , 0 , Kind);
1511
- }
1512
- }
1513
-
1514
1505
// / Determine whether the following tokens are valid after a type-specifier
1515
1506
// / which could be a standalone declaration. This will conservatively return
1516
1507
// / true if there's any doubt, and is appropriate for insert-';' fixits.
@@ -1692,21 +1683,15 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind,
1692
1683
1693
1684
ParsedAttributes attrs (AttrFactory);
1694
1685
// If attributes exist after tag, parse them.
1695
- for (;;) {
1696
- MaybeParseAttributes (PAKM_CXX11 | PAKM_Declspec | PAKM_GNU, attrs);
1697
- // Parse inheritance specifiers.
1698
- if (Tok.isOneOf (tok::kw___single_inheritance,
1699
- tok::kw___multiple_inheritance,
1700
- tok::kw___virtual_inheritance)) {
1701
- ParseMicrosoftInheritanceClassAttributes (attrs);
1702
- continue ;
1703
- }
1704
- if (Tok.is (tok::kw__Nullable)) {
1705
- ParseNullabilityClassAttributes (attrs);
1706
- continue ;
1707
- }
1708
- break ;
1709
- }
1686
+ MaybeParseAttributes (PAKM_CXX11 | PAKM_Declspec | PAKM_GNU, attrs);
1687
+
1688
+ // Parse inheritance specifiers.
1689
+ if (Tok.isOneOf (tok::kw___single_inheritance, tok::kw___multiple_inheritance,
1690
+ tok::kw___virtual_inheritance))
1691
+ ParseMicrosoftInheritanceClassAttributes (attrs);
1692
+
1693
+ // Allow attributes to precede or succeed the inheritance specifiers.
1694
+ MaybeParseAttributes (PAKM_CXX11 | PAKM_Declspec | PAKM_GNU, attrs);
1710
1695
1711
1696
// Source location used by FIXIT to insert misplaced
1712
1697
// C++11 attributes
0 commit comments