@@ -2707,8 +2707,7 @@ bool Parser::isCXX2CTriviallyRelocatableKeyword() const {
27072707 return isCXX2CTriviallyRelocatableKeyword (Tok);
27082708}
27092709
2710- void Parser::ParseCXX2CTriviallyRelocatableSpecifier (
2711- TriviallyRelocatableSpecifier &TRS) {
2710+ void Parser::ParseCXX2CTriviallyRelocatableSpecifier (SourceLocation &TRS) {
27122711 assert (isCXX2CTriviallyRelocatableKeyword () &&
27132712 " expected a trivially_relocatable specifier" );
27142713
@@ -2717,7 +2716,7 @@ void Parser::ParseCXX2CTriviallyRelocatableSpecifier(
27172716 : diag::ext_relocatable_keyword)
27182717 << /* relocatable*/ 0 ;
27192718
2720- TRS = Actions. ActOnTriviallyRelocatableSpecifier ( ConsumeToken () );
2719+ TRS = ConsumeToken ();
27212720}
27222721
27232722bool Parser::isCXX2CReplaceableKeyword (Token Tok) const {
@@ -2734,7 +2733,7 @@ bool Parser::isCXX2CReplaceableKeyword() const {
27342733 return isCXX2CReplaceableKeyword (Tok);
27352734}
27362735
2737- void Parser::ParseCXX2CReplaceableSpecifier (ReplaceableSpecifier &MRS) {
2736+ void Parser::ParseCXX2CReplaceableSpecifier (SourceLocation &MRS) {
27382737 assert (isCXX2CReplaceableKeyword () &&
27392738 " expected a replaceable_if_eligible specifier" );
27402739
@@ -2743,7 +2742,7 @@ void Parser::ParseCXX2CReplaceableSpecifier(ReplaceableSpecifier &MRS) {
27432742 : diag::ext_relocatable_keyword)
27442743 << /* replaceable*/ 1 ;
27452744
2746- MRS = Actions. ActOnReplaceableSpecifier ( ConsumeToken () );
2745+ MRS = ConsumeToken ();
27472746}
27482747
27492748// / isClassCompatibleKeyword - Determine whether the next token is a C++11
@@ -3868,31 +3867,30 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc,
38683867 SourceLocation AbstractLoc;
38693868 bool IsFinalSpelledSealed = false ;
38703869 bool IsAbstract = false ;
3871- TriviallyRelocatableSpecifier TriviallyRelocatable;
3872- ReplaceableSpecifier Replacable;
3870+ SourceLocation TriviallyRelocatable;
3871+ SourceLocation Replacable;
38733872
38743873 // Parse the optional 'final' keyword.
38753874 if (getLangOpts ().CPlusPlus && Tok.is (tok::identifier)) {
38763875 while (true ) {
38773876 VirtSpecifiers::Specifier Specifier = isCXX11VirtSpecifier (Tok);
38783877 if (Specifier == VirtSpecifiers::VS_None) {
38793878 if (isCXX2CTriviallyRelocatableKeyword (Tok)) {
3880- if (TriviallyRelocatable.isSet ()) {
3879+ if (TriviallyRelocatable.isValid ()) {
38813880 auto Skipped = Tok;
38823881 ConsumeToken ();
38833882 Diag (Skipped, diag::err_duplicate_class_relocation_specifier)
3884- << /* trivial_relocatable*/ 0
3885- << TriviallyRelocatable.getLocation ();
3883+ << /* trivial_relocatable*/ 0 << TriviallyRelocatable;
38863884 } else {
38873885 ParseCXX2CTriviallyRelocatableSpecifier (TriviallyRelocatable);
38883886 }
38893887 continue ;
38903888 } else if (isCXX2CReplaceableKeyword (Tok)) {
3891- if (Replacable.isSet ()) {
3889+ if (Replacable.isValid ()) {
38923890 auto Skipped = Tok;
38933891 ConsumeToken ();
38943892 Diag (Skipped, diag::err_duplicate_class_relocation_specifier)
3895- << /* replaceable*/ 1 << Replacable. getLocation () ;
3893+ << /* replaceable*/ 1 << Replacable;
38963894 } else {
38973895 ParseCXX2CReplaceableSpecifier (Replacable);
38983896 }
@@ -3937,7 +3935,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc,
39373935 Diag (FinalLoc, diag::ext_warn_gnu_final);
39383936 }
39393937 assert ((FinalLoc.isValid () || AbstractLoc.isValid () ||
3940- TriviallyRelocatable.isSet () || Replacable.isSet ()) &&
3938+ TriviallyRelocatable.isValid () || Replacable.isValid ()) &&
39413939 " not a class definition" );
39423940
39433941 // Parse any C++11 attributes after 'final' keyword.
0 commit comments