You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Clang] Preserve CXXParenListInitExpr in TreeTransform. (#138518)
We were converting a CXXParenListInitExpr to a ParenListExpr in
TreeTransform.
However, ParenListExpr is typeless, so Clang could not rebuild the
correct initialization sequence in some contexts.
Fixes#72880
constexpr F f2(1, 1); // OK: f2.b is initialized by a constant expression.
158
158
// beforecxx20-warning@-1 {{aggregate initialization of type 'const F' from a parenthesized list of values is a C++20 extension}}
159
159
160
-
bar<int, 'a'>();
161
-
// beforecxx20-note@-1 {{in instantiation of function template specialization 'bar<int, 'a'>' requested here}}
162
-
163
160
G<char> g('b', 'b');
164
161
// beforecxx20-warning@-1 {{aggregate initialization of type 'G<char>' from a parenthesized list of values is a C++20 extension}}
165
162
@@ -354,7 +351,7 @@ using Td = int[]; Td d(42,43);
354
351
// beforecxx20-warning@-1 {{aggregate initialization of type 'int[2]' from a parenthesized list of values is a C++20 extension}}
355
352
template<typename T, int Sz> using ThroughAlias = T[Sz];
356
353
ThroughAlias<int, 1> e(42);
357
-
// beforecxx20-warning@-1 {{aggregate initialization of type 'ThroughAlias<int, 1>' (aka 'int[1]') from a parenthesized list of values is a C++20 extension}}
354
+
// beforecxx20-warning@-1 {{aggregate initialization of type 'ThroughAlias<int, 1>' (aka 'int[1]') from a parenthesized list of values is a C++20 extension}}
0 commit comments