================ @@ -3808,13 +3866,39 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AbstractLoc; bool IsFinalSpelledSealed = false; bool IsAbstract = false; + TriviallyRelocatableSpecifier TriviallyRelocatable; + ReplaceableSpecifier Replacable; // Parse the optional 'final' keyword. if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) { while (true) { VirtSpecifiers::Specifier Specifier = isCXX11VirtSpecifier(Tok); - if (Specifier == VirtSpecifiers::VS_None) - break; + if (Specifier == VirtSpecifiers::VS_None) { + if (isCXX2CTriviallyRelocatableKeyword(Tok)) { + if (TriviallyRelocatable.isSet()) { + auto Skipped = Tok; + ConsumeToken(); + Diag(Skipped, diag::err_duplicate_class_relocation_specifier) + << 0 << TriviallyRelocatable.getLocation(); + } else { + ParseOptionalCXX2CTriviallyRelocatableSpecifier( ---------------- erichkeane wrote:
Based on the use, it makes sense to me to just omit `Optional` from these function names. https://github.com/llvm/llvm-project/pull/127636 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits