Skip to content

Commit 437992d

Browse files
committed
Added test for multiple base classes
1 parent 8636714 commit 437992d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clang/test/SemaCXX/type-traits-unsatisfied-diags.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,4 +265,18 @@ static_assert(__is_trivially_copyable(S10));
265265
// expected-note@-1 {{because it has a user provided move assignment operator}} \
266266
// expected-note@-1 {{'S10' is not trivially copyable}} \
267267
// expected-note@#tc-S10 {{'S10' defined here}}
268+
269+
struct B5 : B4 {
270+
};
271+
272+
struct B6 : B5 {
273+
};
274+
275+
struct S11 : B6 { // #tc-S11
276+
};
277+
static_assert(__is_trivially_copyable(S11));
278+
// expected-error@-1 {{static assertion failed due to requirement '__is_trivially_copyable(trivially_copyable::S11)'}} \
279+
// expected-note@-1 {{because it has a non-trivially-copyable base 'B6'}} \
280+
// expected-note@-1 {{'S11' is not trivially copyable}} \
281+
// expected-note@#tc-S11 {{'S11' defined here}}
268282
}

0 commit comments

Comments
 (0)