]> granicus.if.org Git - clang/commit
[analyzer] Teach CastSizeChecker about flexible array members.
authorJordan Rose <jordan_rose@apple.com>
Tue, 18 Feb 2014 17:06:30 +0000 (17:06 +0000)
committerJordan Rose <jordan_rose@apple.com>
Tue, 18 Feb 2014 17:06:30 +0000 (17:06 +0000)
commite1bb9b2c6cc9d337bcb14af048196f116ffb685d
treeeaada02c1154ed2619c8ab1d9d6737456d8a9c8a
parent90801c62b7d5ddd5e4b5bfbdfaa92216bf9722d8
[analyzer] Teach CastSizeChecker about flexible array members.

...as well as fake flexible array members: structs that end in arrays with
length 0 or 1.

Patch by Daniel Fahlgren!

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