]> granicus.if.org Git - clang/commit
[analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering...
authorKristof Umann <dkszelethus@gmail.com>
Wed, 8 Aug 2018 12:23:02 +0000 (12:23 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Wed, 8 Aug 2018 12:23:02 +0000 (12:23 +0000)
commit9480a8d28700c7a327fe6e1eda8ff84266c8031c
tree11220de1fbc4d2e4f4efeb6e7f0b5e1ff15f0e80
parent11297f641b30ac7903dbe93160d176e904dad158
[analyzer][UninitializedObjectChecker] Fixed a false negative by no longer filtering out certain constructor calls

As of now, all constructor calls are ignored that are being called
by a constructor. The point of this was not to analyze the fields
of an object, so an uninitialized field wouldn't be reported
multiple times.

This however introduced false negatives when the two constructors
were in no relation to one another -- see the test file for a neat
example for this with singletons. This patch aims so fix this issue.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339237 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp
test/Analysis/cxx-uninitialized-object.cpp