aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorYuanfang Chen <yuanfang.chen@sony.com>2023-07-01 17:19:38 -0700
committerYuanfang Chen <yuanfang.chen@sony.com>2023-07-01 17:23:41 -0700
commitc0e23bcdfb743f4d7d05e215fb60c987f629498d (patch)
tree344daefc5c8ca05c73bc26607d69e59a25bf5d93 /clang/lib/Sema/SemaInit.cpp
parent6e54fccede402c9ed0e8038aa258a99c5a2773e5 (diff)
downloadllvm-c0e23bcdfb743f4d7d05e215fb60c987f629498d.zip
llvm-c0e23bcdfb743f4d7d05e215fb60c987f629498d.tar.gz
llvm-c0e23bcdfb743f4d7d05e215fb60c987f629498d.tar.bz2
[clang] P1816R0 and P2082R1 should work for cxx20 and after only
For commit 632dd6a4ca0036009f
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 90c1bfa..b893d35 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -10675,7 +10675,7 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
TD, FoundDecl, /*ExplicitArgs=*/nullptr, TmpInits, Candidates,
SuppressUserConversions,
/*PartialOverloading=*/false, AllowExplicit, ADLCallKind::NotADL,
- /*PO=*/{}, /*AggregateCandidateDeduction=*/true);
+ /*PO=*/{}, AllowAggregateDeductionCandidate);
} else {
AddOverloadCandidate(GD, FoundDecl, Inits, Candidates,
SuppressUserConversions,
@@ -10772,7 +10772,7 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer(
// parenthesized expression-list, and there are no deduction-guides for
// C, the set contains an additional function template, called the
// aggregate deduction candidate, defined as follows.
- if (!HasAnyDeductionGuide) {
+ if (getLangOpts().CPlusPlus20 && !HasAnyDeductionGuide) {
if (ListInit && ListInit->getNumInits()) {
SynthesizeAggrGuide(ListInit);
} else if (PL && PL->getNumExprs()) {