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
Copy file name to clipboardExpand all lines: clang/test/Sema/uninit-variables.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -558,7 +558,7 @@ struct with_explicit_field {
558
558
};
559
559
560
560
voidaggregate() {
561
-
structwith_explicit_fielda; // expected-warning {{field in 'with_explicit_field' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_Y {{'y' declared here}}
562
-
structwith_explicit_fieldb= {1}; // expected-warning {{field 'y' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_Y {{'y' declared here}}
561
+
structwith_explicit_fielda; // expected-warning {{field in 'with_explicit_field' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_Y {{'y' declared here}}
562
+
structwith_explicit_fieldb= {1}; // expected-warning {{field 'y' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_Y {{'y' declared here}}
Copy file name to clipboardExpand all lines: clang/test/SemaCXX/uninitialized.cpp
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -1513,62 +1513,62 @@ void aggregate() {
1513
1513
1514
1514
S::foo(S{1, 2, 3, 4});
1515
1515
S::foo(S{.s1 = 100, .s4 = 100});
1516
-
S::foo(S{.s1 = 100}); // expected-warning {{field 's4' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S4 {{'s4' declared here}}
1516
+
S::foo(S{.s1 = 100}); // expected-warning {{field 's4' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}}
1517
1517
1518
1518
S s{.s1 = 100, .s4 = 100};
1519
1519
(void)s;
1520
1520
1521
-
S t{.s4 = 100}; // expected-warning {{field 's1' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}}
1521
+
S t{.s4 = 100}; // expected-warning {{field 's1' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}}
1522
1522
(void)t;
1523
1523
1524
-
S *ptr1 = new S; // expected-warning {{field in 'S' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S4 {{'s4' declared here}} expected-note@#FIELD_S1 {{'s1' declared here}}
1524
+
S *ptr1 = new S; // expected-warning {{field in 'S' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}} expected-note@#FIELD_S1 {{'s1' declared here}}
1525
1525
delete ptr1;
1526
1526
1527
1527
S *ptr2 = new S{.s1 = 100, .s4 = 100};
1528
1528
delete ptr2;
1529
1529
1530
1530
#if __cplusplus >= 202002L
1531
-
// expected-warning@+2 {{field 'd2' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_D2 {{'d2' declared here}}
1532
-
// expected-warning {{field 's1' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}}
1531
+
// expected-warning@+2 {{field 'd2' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_D2 {{'d2' declared here}}
1532
+
// expected-warning {{field 's1' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}}
1533
1533
D a({}, 0);
1534
1534
(void)a;
1535
1535
#else
1536
-
C a; // expected-warning {{field in 'C' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_C1 {{'c1' declared here}}
1536
+
C a; // expected-warning {{field in 'C' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_C1 {{'c1' declared here}}
1537
1537
(void)a;
1538
1538
#endif
1539
1539
1540
-
// expected-warning@+2 {{field 's4' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S4 {{'s4' declared here}}
1541
-
// expected-warning@+1 {{field 's1' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}}
1540
+
// expected-warning@+2 {{field 's4' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}}
1541
+
// expected-warning@+1 {{field 's1' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}}
1542
1542
D b{.d2 = 1};
1543
1543
(void)b;
1544
1544
1545
-
// expected-warning@+3 {{field 's4' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S4 {{'s4' declared here}}
1546
-
// expected-warning@+2 {{field 'd2' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_D2 {{'d2' declared here}}
1547
-
// expected-warning@+1 {{field 's1' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}}
1545
+
// expected-warning@+3 {{field 's4' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}}
1546
+
// expected-warning@+2 {{field 'd2' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_D2 {{'d2' declared here}}
1547
+
// expected-warning@+1 {{field 's1' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}}
1548
1548
D c{.d1 = 5};
1549
1549
1550
-
// expected-warning@+3 {{field 's4' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S4 {{'s4' declared here}}
1551
-
// expected-warning@+2 {{field 'd2' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_D2 {{'d2' declared here}}
1552
-
// expected-warning@+1 {{field 's1' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}}
1550
+
// expected-warning@+3 {{field 's4' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S4 {{'s4' declared here}}
1551
+
// expected-warning@+2 {{field 'd2' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_D2 {{'d2' declared here}}
1552
+
// expected-warning@+1 {{field 's1' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}}
1553
1553
c = {{}, 0};
1554
1554
(void)c;
1555
1555
1556
1556
// expected-note@+3 {{in implicit default constructor for 'D' first required here}}
1557
-
// expected-warning@#TYPE_D {{field in 'S' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_S1 {{'s1' declared here}} expected-note@#FIELD_S4 {{'s4' declared here}}
1558
-
// expected-warning@+1 {{field in 'D' is not explicitly initialized, but was marked as requiring explicit initialization}} expected-note@#FIELD_D2 {{'d2' declared here}}
1557
+
// expected-warning@#TYPE_D {{field in 'S' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_S1 {{'s1' declared here}} expected-note@#FIELD_S4 {{'s4' declared here}}
1558
+
// expected-warning@+1 {{field in 'D' requires explicit initialization but is not explicitly initialized}} expected-note@#FIELD_D2 {{'d2' declared here}}
1559
1559
D d;
1560
1560
(void)d;
1561
1561
1562
-
// expected-warning@+12 {{field in 'E' is not explicitly initialized, but was marked as requiring explicit initialization}}
1562
+
// expected-warning@+12 {{field in 'E' requires explicit initialization but is not explicitly initialized}}
1563
1563
// expected-note@#FIELD_E2 {{'e2' declared here}}
1564
-
// expected-warning@#TYPE_E {{field in 'D' is not explicitly initialized, but was marked as requiring explicit initialization}}
1564
+
// expected-warning@#TYPE_E {{field in 'D' requires explicit initialization but is not explicitly initialized}}
1565
1565
// expected-note@+9 {{in implicit default constructor for 'E' first required here}}
1566
1566
// expected-note@#FIELD_D2 {{'d2' declared here}}
1567
-
// expected-warning@#TYPE_E {{field in 'D' is not explicitly initialized, but was marked as requiring explicit initialization}}
1567
+
// expected-warning@#TYPE_E {{field in 'D' requires explicit initialization but is not explicitly initialized}}
1568
1568
// expected-note@#FIELD_D2 {{'d2' declared here}}
1569
-
// expected-warning@#TYPE_E {{field in 'D2' is not explicitly initialized, but was marked as requiring explicit initialization}}
1569
+
// expected-warning@#TYPE_E {{field in 'D2' requires explicit initialization but is not explicitly initialized}}
1570
1570
// expected-note@#TYPE_E {{in implicit default constructor for 'D2' first required here}}
1571
-
// expected-warning@#TYPE_D2 {{field in 'D' is not explicitly initialized, but was marked as requiring explicit initialization}}
1571
+
// expected-warning@#TYPE_D2 {{field in 'D' requires explicit initialization but is not explicitly initialized}}
1572
1572
// expected-note@+2 {{in implicit default constructor for 'E' first required here}}
0 commit comments