[cfe-dev] clang-tidy check: Uninitialised primitive members in constructors

Jonathan Coe jbcoe at me.com
Mon Feb 2 10:39:53 PST 2015


I'm looking to make use of a clang-tidy check that would find (and
optionally value-initialise) primitive class members (pointers, int,
doubles etc).

class C
{
  int x_;
public:
  C() {} // no x_()
};

Is this:

1) Already possible? (I can't find it)

2) Already work in progress? (I'd like to participate)

3) Possible at all?

3. Is motivated by my very weak understanding of the matchers, I'm not sure
if I can match things that are missing if the missing things depend on the
node I'm looking at. It would be nice to match the compiler generated
constructor too (and generate one) if that would fail to initialise
primitives as required.

Thanks in advance,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150202/12767df1/attachment.html>


More information about the cfe-dev mailing list