1 | // RUN: %check_clang_tidy -expect-clang-tidy-error %s cppcoreguidelines-pro-type-member-init %t |
---|---|
2 | |
3 | struct X { |
4 | X x; |
5 | // CHECK-MESSAGES: :[[@LINE-1]]:5: error: field has incomplete type 'X' [clang-diagnostic-error] |
6 | int a = 10; |
7 | }; |
8 |
1 | // RUN: %check_clang_tidy -expect-clang-tidy-error %s cppcoreguidelines-pro-type-member-init %t |
---|---|
2 | |
3 | struct X { |
4 | X x; |
5 | // CHECK-MESSAGES: :[[@LINE-1]]:5: error: field has incomplete type 'X' [clang-diagnostic-error] |
6 | int a = 10; |
7 | }; |
8 |