Skip to content

Commit 92e5857

Browse files
committed
add another test case
1 parent 58ff884 commit 92e5857

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

clang/test/AST/Interp/records.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,5 +1191,17 @@ namespace IndirectFieldInit {
11911191
};
11921192
constexpr Nested4 N4{};
11931193
static_assert(N4.first == 123, "");
1194+
1195+
struct S {
1196+
struct {
1197+
int x, y;
1198+
};
1199+
1200+
constexpr S(int x_, int y_) : x(x_), y(y_) {}
1201+
};
1202+
1203+
constexpr S s(1, 2);
1204+
static_assert(s.x == 1 && s.y == 2);
1205+
11941206
#endif
11951207
}

0 commit comments

Comments
 (0)