]> granicus.if.org Git - clang/commit
[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields
authorKristof Umann <dkszelethus@gmail.com>
Fri, 14 Sep 2018 10:10:09 +0000 (10:10 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Fri, 14 Sep 2018 10:10:09 +0000 (10:10 +0000)
commit43cdc8690f87bf974c1f6d2642da75ca6306fbfd
treebe844e04fb7fb778a19b13aea39aaad35ec99cfa
parent91ef6e511f5a746095dffca144cbe57dc665d04a
[analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields

Based on a suggestion from @george.karpenkov.

In some cases, structs are used as unions with a help of a tag/kind field.
This patch adds a new string flag (a pattern), that is matched against the
fields of a record, and should a match be found, the entire record is ignored.

For more info refer to http://lists.llvm.org/pipermail/cfe-dev/2018-August/058906.html
and to the responses to that, especially http://lists.llvm.org/pipermail/cfe-dev/2018-August/059215.html.

Differential Revision: https://reviews.llvm.org/D51680

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342220 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object-unionlike-constructs.cpp [new file with mode: 0644]
www/analyzer/alpha_checks.html