[clang] [clang] Refine handling of C++20 aggregate initialization (PR #131320)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 16 03:13:15 PDT 2025
================
@@ -6714,7 +6714,8 @@ void InitializationSequence::InitializeFrom(Sema &S,
OverloadCandidateSet::iterator Best;
OverloadingResult OR = getFailedCandidateSet().BestViableFunction(
S, Kind.getLocation(), Best);
- if (OR != OverloadingResult::OR_Deleted) {
+ if (OR != OverloadingResult::OR_Deleted &&
+ Kind.getKind() == InitializationKind::IK_Direct) {
----------------
offsetof wrote:
I discovered a couple more issues in this area, and updated the PR with a more comprehensive fix, along with more tests and a release note as requested.
https://github.com/llvm/llvm-project/pull/131320
More information about the cfe-commits
mailing list