Fix some false-positives with cppcoreguidelines-pro-type-member-init. Handle classes...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 4 Oct 2016 14:48:05 +0000 (14:48 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 4 Oct 2016 14:48:05 +0000 (14:48 +0000)
commitfdaabf1ca7bc95c2de6c0b834c03629a287bcb3a
tree75af0a1138919bc1f75acf5eeaefb6e0de4524b5
parent92589990bae53c00179b772fd500ef6679455c90
Fix some false-positives with cppcoreguidelines-pro-type-member-init. Handle classes with default constructors that are defaulted or are not present in the AST.
Classes with virtual methods or virtual bases are not trivially default constructible, so their members and bases need to be initialized.

Patch by Malcolm Parsons.

llvm-svn: 283224
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h
clang-tools-extra/clang-tidy/utils/TypeTraits.cpp
clang-tools-extra/test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp