[clang-tidy] ClangTidy check to flag uninitialized builtin and pointer fields.
authorFelix Berger <flx@google.com>
Mon, 15 Feb 2016 04:27:56 +0000 (04:27 +0000)
committerFelix Berger <flx@google.com>
Mon, 15 Feb 2016 04:27:56 +0000 (04:27 +0000)
commitffae543b39ca51bf0108593689e143a50aea9087
tree17fe1343ca0126684bdf2be939bcd6289058b9eb
parentcc9df3b9cc5f8c8671c91775ba7f3c410650f72c
[clang-tidy] ClangTidy check to flag uninitialized builtin and pointer fields.

Summary:
This patch is a continuation of http://reviews.llvm.org/D10553 by Jonathan B Coe.

The main additions are:

1. For C++11 the check suggests in-class field initialization as fix. This
makes the fields future proof towards the addition of new constructors.
2 For older language versions the fields are added in the right position
in the initializer list with more tests.
3. User documentation.

Reviewers: alexfh, jbcoe

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D16517

llvm-svn: 260873
clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init-cxx98.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp [new file with mode: 0644]