]> granicus.if.org Git - clang/commit
[analyzer] Fix a false positive in sizeof malloc checker.
authorAnna Zaks <ganna@apple.com>
Fri, 7 Sep 2012 19:20:13 +0000 (19:20 +0000)
committerAnna Zaks <ganna@apple.com>
Fri, 7 Sep 2012 19:20:13 +0000 (19:20 +0000)
commit258bd59eee5403fc2a98fb23df71fa0281a3ec29
tree1959e307fb5d5bb1161326d0abaa9fda4a1eb777
parentc957319941e93db2bc399efa7a9d1425bc609ba9
[analyzer] Fix a false positive in sizeof malloc checker.

Don't warn when the sizeof argument is an array with the same element
type as the pointee of the return type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163407 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp
test/Analysis/malloc-sizeof.c