i guess, i found three different types of false positives for the check 'cppcoreguidelines-init-variables':
.../ctor_test.cc:21:31: warning: variable 'vec' is not initialized [cppcoreguidelines-init-variables]
abc::core::Vector<double, 2> vec = abc::core::Vector<double, 2>::zeros();
^
= 0
.../ctor_test.cc:44:31: warning: variable 'vec' is not initialized [cppcoreguidelines-init-variables]
abc::core::Vector<double, 2> vec(ary2);
^
= 0
.../ops_test.cc:57:31: warning: variable 'vec' is not initialized [cppcoreguidelines-init-variables]
abc::core::Vector<double, 3> vec{1., 1., 1.};
^
= 0
i used the command:
clang-tidy -header-filter='.*' -checks='*,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-fuchsia-default-arguments-calls,-fuchsia-default-arguments-declarations,-fuchsia-virtual-inheritance,-fuchsia-overloaded-operator,-fuchsia-multiple-inheritance,-google-runtime-references,-modernize-use-trailing-return-type' 'dir/ctor_test.cc' -- -x c++ -Wno-c++98-compat -Wno-c++-compat -std=c++11 -I include
Extended Description
i guess, i found three different types of false positives for the check 'cppcoreguidelines-init-variables':
i used the command:
clang-tidy -header-filter='.*' -checks='*,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-fuchsia-default-arguments-calls,-fuchsia-default-arguments-declarations,-fuchsia-virtual-inheritance,-fuchsia-overloaded-operator,-fuchsia-multiple-inheritance,-google-runtime-references,-modernize-use-trailing-return-type' 'dir/ctor_test.cc' -- -x c++ -Wno-c++98-compat -Wno-c++-compat -std=c++11 -I include
(edit: re-formatted after transfer from bugzilla)