[PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

Michael Miller via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 16:13:28 PDT 2016


michael_miller created this revision.
michael_miller added reviewers: flx, alexfh.
michael_miller added a subscriber: cfe-commits.

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.

http://reviews.llvm.org/D18584

Files:
  clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
  clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
  docs/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.rst
  test/clang-tidy/cppcoreguidelines-pro-type-member-init-cxx98.cpp
  test/clang-tidy/cppcoreguidelines-pro-type-member-init-delayed.cpp
  test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18584.51999.patch
Type: text/x-patch
Size: 42709 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160329/c7e391b3/attachment-0001.bin>


More information about the cfe-commits mailing list