diff --git a/clang/include/clang/Sema/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h --- a/clang/include/clang/Sema/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -964,10 +964,10 @@ UnqualifiedId(const UnqualifiedId &Other) = delete; const UnqualifiedId &operator=(const UnqualifiedId &) = delete; -public: /// Describes the kind of unqualified-id parsed. UnqualifiedIdKind Kind; +public: struct OFI { /// The kind of overloaded operator. OverloadedOperatorKind Operator; diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -413,7 +413,7 @@ bool Declarator::isStaticMember() { assert(getContext() == DeclaratorContext::Member); return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static || - (getName().Kind == UnqualifiedIdKind::IK_OperatorFunctionId && + (getName().getKind() == UnqualifiedIdKind::IK_OperatorFunctionId && CXXMethodDecl::isStaticOverloadedOperator( getName().OperatorFunctionId.Operator)); } diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6586,8 +6586,8 @@ Diag(D.getDeclSpec().getConstexprSpecLoc(), diag::err_invalid_constexpr) << 1 << static_cast(D.getDeclSpec().getConstexprSpecifier()); - if (D.getName().Kind != UnqualifiedIdKind::IK_Identifier) { - if (D.getName().Kind == UnqualifiedIdKind::IK_DeductionGuideName) + if (D.getName().getKind() != UnqualifiedIdKind::IK_Identifier) { + if (D.getName().getKind() == UnqualifiedIdKind::IK_DeductionGuideName) Diag(D.getName().StartLocation, diag::err_deduction_guide_invalid_specifier) << "typedef"; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -13009,7 +13009,7 @@ Previous.clear(); } - assert(Name.Kind == UnqualifiedIdKind::IK_Identifier && + assert(Name.getKind() == UnqualifiedIdKind::IK_Identifier && "name in alias declaration must be an identifier"); TypeAliasDecl *NewTD = TypeAliasDecl::Create(Context, CurContext, UsingLoc, Name.StartLocation,