diff options
author | Younan Zhang <zyn7109@gmail.com> | 2024-06-13 17:47:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 17:47:03 +0800 |
commit | a144bf2b2511b47fc165755817eda17f79ef5476 (patch) | |
tree | 506702f82f0e3a99de5362ca94f797e039ec0152 /llvm/lib/ProfileData/Coverage/CoverageMapping.cpp | |
parent | 3475116e2c37a2c8a69658b36c02871c322da008 (diff) | |
download | llvm-a144bf2b2511b47fc165755817eda17f79ef5476.zip llvm-a144bf2b2511b47fc165755817eda17f79ef5476.tar.gz llvm-a144bf2b2511b47fc165755817eda17f79ef5476.tar.bz2 |
[Clang] Fix handling of brace ellison when building deduction guides (#94889)
Fixes two issues in two ways:
1) The `braced-init-list` consisted of `initializer-list` and
`designated-initializer-list`, and thus the designated initializer is
subject to [over.match.class.deduct]p1.8, which means the brace elision
is also applicable on it for CTAD deduction guides.
2) When forming a deduction guide where the brace elision is applicable,
we should also consider the presence of braces within the initializer.
For example, given
template <class T, class U> struct X {
T t[2];
U u[3];
};
X x = {{1, 2}, 3, 4, 5};
we should establish such deduction guide AFAIU: `X(T (&&)[2], U, U, U) -> X<T, U>`.
Fixes https://github.com/llvm/llvm-project/issues/64625
Fixes https://github.com/llvm/llvm-project/issues/83368
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMapping.cpp')
0 files changed, 0 insertions, 0 deletions