[PATCH] D10553: misc-uninitialized-field

Matthias Gehre via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 16:16:00 PDT 2015


mgehre added a subscriber: mgehre.
mgehre added a comment.

This check is a close fit for
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type6-always-initialize-a-member-variable
The "enforcement" there says:

- Issue a diagnostic for any constructor of a non-trivially-constructible type that does not initialize all member variables. To fix: Write a data member initializer, or mention it in the member initializer list.
- Issue a diagnostic when constructing an object of a trivially constructible type without () or {} to initialize its members. To fix: Add () or {}.

We could then move this check to cppcoreguidelines module.


http://reviews.llvm.org/D10553





More information about the llvm-commits mailing list