1// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-default-member-init %t
2
3struct PositiveBitField
4{
5 PositiveBitField() : i(6) {}
6 // CHECK-FIXES: PositiveBitField() {}
7 int i : 5;
8 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use default member initializer for 'i' [modernize-use-default-member-init]
9 // CHECK-FIXES: int i : 5{6};
10};
11

source code of clang-tools-extra/test/clang-tidy/checkers/modernize/use-default-member-init-bitfield.cpp