[cfe-dev] [analyzer] UninitializedObjectChecker evaluation

Kristóf Umann via cfe-dev cfe-dev at lists.llvm.org
Tue Apr 30 13:25:06 PDT 2019


As of https://reviews.llvm.org/D58573, UninitializedObjectChecker is out of
alpha. Since that patch landed, I've received some bug reports, which I'm
super grateful for, both for finding and reporting the errors, and also for
the reason that it's being used.

Since it is being used, however, I'm very interested in the user
experience. I personally found it to be almost unbearably noisy for LLVM,
as this checker finds partially/fully uninitialized objects, and as a
performance critical project, it takes advantage of not initializing
certain fields.

My experience for any "regular" projects however was very different,
analyzing cppcheck, bitcoin, rtags, cap n proto, xerces resulted gathering
some very meaningful reports, often pointing out errors such as

struct MyStruct {
  MyStruct() {} // should be = default;
  int a, b,  c, d;

struct DidntHaveTheTimeToWriteAProperConstructor {
  DidntHaveTheTimeToWriteAProperConstructor() : a(0), b(0) {}

  int a, b, hopeNobodyForgetsAboutThisOne;

Could you please share some of your experiences using this checker? Would
you like to see some improvements being made? Would you configure this
checker for your project, if you were exposed to some checker options?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190430/2b807362/attachment.html>

More information about the cfe-dev mailing list