[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 11 11:57:14 PDT 2018


NoQ added a comment.

Ok, thanks, looking forward to it!



================
Comment at: test/Analysis/ctor-uninitialized-member.cpp:869
+void f44() {
+  ContainsUnionWithSimpleUnionTest2(); // xpected-warning{{1 uninitialized field}}
+}
----------------
Szelethus wrote:
> NoQ wrote:
> > Hmm, shouldn't it say "expected"? Do these tests actually work?
> Since unions are not yet supported by the CSA, this is only what would be expected from this checker to find in the future. I purposely wrote 'xpected' so tests wouldn't break.
Aha, okay, got it. The tradition is to say "// no-warning" and then put a FIXME nearby saying that it should warn, how it should warn, probably why it should warn, if it's non-obvious.


https://reviews.llvm.org/D45532





More information about the cfe-commits mailing list