[cfe-dev] [analyzer] UninitializedObjectChecker evaluation

Kristóf Umann via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 13 11:31:06 PDT 2018


Thank you so much for this! I'm very grateful for all the reviews and
feedback I've been given, makes my work so much more enjoyable.

I'm aware of this issue, LLVM/Clang is littered with these constructs. I
haven't tried to fix it just yet. Maybe add a heuristic that fields/types
with "Kind" or "Tag" substring in them should be ignored?

Best regards,
Kristóf Umann

(Btw my first name is Kristóf, it's quite confusing in hungarian)

On 13 Aug 2018 20:15, "George Karpenkov" <ekarpenkov at apple.com> wrote:


I have recently evaluated the  (relatively recently developed, available
with -Xclang -analyzer-checker=alpha.cplusplus.UninitializedObject)
UninitializedObjectChecker, which warns after the constructor call if any
of the fields were left uninitialized.

Good news: I have found a few actual bugs
Bad news: Those bugs were hidden under hundreds of other reports

Most of the false alarms come from a case where a class is actually used as
a union,
and a field is used to differentiate between those types.
Then unused types are simply left uninitialized.
Conceptually, this is not a correct design, but nevertheless, it is rather

I have no idea whether we can work around this case, @Umann, any ideas

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

More information about the cfe-dev mailing list