diff options
author | Anna Zaks <ganna@apple.com> | 2012-06-08 18:44:43 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-06-08 18:44:43 +0000 |
commit | 2e336ac5ace420470bbb0ff54a94a5484443a44f (patch) | |
tree | 9d2c96652685dde14cad60133aef390a4a0112b7 /lib/Sema/SemaExpr.cpp | |
parent | 6fe6a49c4058211ff4489023c78615ec0266c5ff (diff) |
[analyzer] MallocSizeofChecker false positive: when sizeof is argument
to addition.
We should not to warn in case the malloc size argument is an
addition containing 'sizeof' operator - it is common to use the pattern
to pack values of different sizes into a buffer.
Ex:
uint8_t *buffer = (uint8_t*)malloc(dataSize + sizeof(length));
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
0 files changed, 0 insertions, 0 deletions