File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -5416,6 +5416,8 @@ struct EnsureImmediateInvocationInDefaultArgs
5416
5416
EnsureImmediateInvocationInDefaultArgs(Sema &SemaRef)
5417
5417
: TreeTransform(SemaRef) {}
5418
5418
5419
+ bool AlwaysRebuild() { return true; }
5420
+
5419
5421
// Lambda can only have immediate invocations in the default
5420
5422
// args of their parameters, which is transformed upon calling the closure.
5421
5423
// The body is not a subexpression, so we have nothing to do.
Original file line number Diff line number Diff line change @@ -99,6 +99,25 @@ void TypeTest_Element_Test::TestBody() {
99
99
&TestBody_got != expect; // expected-warning {{inequality comparison result unused}}
100
100
}
101
101
} // namespace test_rebuild
102
+ namespace test_rebuild2 {
103
+ struct F {
104
+ int g;
105
+ };
106
+ struct H {};
107
+ struct I {
108
+ I (const F &);
109
+ I (H);
110
+ };
111
+ struct L {
112
+ I i = I({.g = 0 });
113
+ };
114
+ struct N : L {};
115
+
116
+ void f () {
117
+ delete new L; // Ok
118
+ delete new N; // Ok
119
+ }
120
+ } // namespace test_rebuild2
102
121
#endif // __cplusplus >= 201703L
103
122
104
123
#if __cplusplus >= 202002L
You can’t perform that action at this time.
0 commit comments