$ clang-tidy -checks=* /tmp/test.cpp -- -std=c++11
2440 warnings generated.
/tmp/test.cpp:7:3: warning: constructor does not initialize these fields: b, c [cppcoreguidelines-pro-type-member-init]
a() {
^
/tmp/test.cpp:8:17: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
std::fill_n(b, 4, 0);
^
Suppressed 2437 warnings (2437 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
Extended Description
include
class a { char b[4]; std::array<char, 4> c;
a() { std::fill_n(b, 4, 0); c.fill(0); } };
$ clang-tidy -checks=* /tmp/test.cpp -- -std=c++11 2440 warnings generated. /tmp/test.cpp:7:3: warning: constructor does not initialize these fields: b, c [cppcoreguidelines-pro-type-member-init] a() { ^ /tmp/test.cpp:8:17: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay] std::fill_n(b, 4, 0); ^ Suppressed 2437 warnings (2437 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
I would say it should not complain here.