diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 6b5baa7..574514b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3522,6 +3522,8 @@ void CompilerInvocation::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Args, OPT_fclang_abi_compat_EQ, "12.0", SA); else if (Opts.getClangABICompat() == LangOptions::ClangABI::Ver14) GenerateArg(Args, OPT_fclang_abi_compat_EQ, "14.0", SA); + else if (Opts.getClangABICompat() == LangOptions::ClangABI::Ver15) + GenerateArg(Args, OPT_fclang_abi_compat_EQ, "15.0", SA); if (Opts.getSignReturnAddressScope() == LangOptions::SignReturnAddressScopeKind::All) @@ -4014,6 +4016,8 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.setClangABICompat(LangOptions::ClangABI::Ver12); else if (Major <= 14) Opts.setClangABICompat(LangOptions::ClangABI::Ver14); + else if (Major <= 15) + Opts.setClangABICompat(LangOptions::ClangABI::Ver15); } else if (Ver != "latest") { Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << A->getValue(); diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 99119bc..84c4a19 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -1107,9 +1107,9 @@ DeduceTemplateArguments(Sema &S, // During partial ordering, if Ai was originally a function parameter pack: // - if P does not contain a function parameter type corresponding to Ai then // Ai is ignored; - bool ClangABICompat14 = S.Context.getLangOpts().getClangABICompat() <= - LangOptions::ClangABI::Ver14; - if (!ClangABICompat14 && PartialOrdering && ArgIdx + 1 == NumArgs && + bool ClangABICompat15 = S.Context.getLangOpts().getClangABICompat() <= + LangOptions::ClangABI::Ver15; + if (!ClangABICompat15 && PartialOrdering && ArgIdx + 1 == NumArgs && isa<PackExpansionType>(Args[ArgIdx])) return Sema::TDK_Success; @@ -2445,8 +2445,8 @@ static bool isSameTemplateArg(ASTContext &Context, if (X.getKind() != Y.getKind()) return false; - bool ClangABICompat14 = - Context.getLangOpts().getClangABICompat() <= LangOptions::ClangABI::Ver14; + bool ClangABICompat15 = + Context.getLangOpts().getClangABICompat() <= LangOptions::ClangABI::Ver15; switch (X.getKind()) { case TemplateArgument::Null: @@ -2480,7 +2480,7 @@ static bool isSameTemplateArg(ASTContext &Context, } case TemplateArgument::Pack: - if (ClangABICompat14) { + if (ClangABICompat15) { if (X.pack_size() != Y.pack_size()) return false; @@ -5464,9 +5464,9 @@ getMoreSpecialized(Sema &S, QualType T1, QualType T2, TemplateLikeDecl *P1, return nullptr; if (Better1 && Better2) { - bool ClangABICompat14 = S.Context.getLangOpts().getClangABICompat() <= - LangOptions::ClangABI::Ver14; - if (!ClangABICompat14) { + bool ClangABICompat15 = S.Context.getLangOpts().getClangABICompat() <= + LangOptions::ClangABI::Ver15; + if (!ClangABICompat15) { // Consider this a fix for CWG1432. Similar to the fix for CWG1395. auto *TST1 = T1->castAs<TemplateSpecializationType>(); auto *TST2 = T2->castAs<TemplateSpecializationType>(); |