Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.
authorAlexander Kornienko <alexfh@google.com>
Wed, 13 Apr 2016 11:35:47 +0000 (11:35 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 13 Apr 2016 11:35:47 +0000 (11:35 +0000)
commit855d97e30caedfa0dea3adf8928f71b16dd8a907
tree675cf9ce2fd58594116ad39ec522b37920e95942
parent4191b90c7560c500cb67defbb10c9ab3bc0563c7
Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

Summary: Added the remaining features needed to satisfy C++ Core Guideline Type.6: Always initialize a member variable to cppcoreguidelines-pro-type-member-init. The check now flags all default-constructed uses of record types without user-provided default constructors that would leave their memory in an undefined state. The check suggests value initializing them instead.

Reviewers: flx, alexfh, aaron.ballman

Subscribers: klimek, aaron.ballman, LegalizeAdulthood, cfe-commits

Patch by Michael Miller!

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

llvm-svn: 266191
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
clang-tools-extra/clang-tidy/utils/Matchers.h
clang-tools-extra/clang-tidy/utils/TypeTraits.cpp
clang-tools-extra/clang-tidy/utils/TypeTraits.h
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init-cxx98.cpp
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init-delayed.cpp
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp