summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/div-sizeof-array.cpp
diff options
context:
space:
mode:
authorDavid Bolvansky <david.bolvansky@gmail.com>2019-09-06 16:12:48 +0000
committerDavid Bolvansky <david.bolvansky@gmail.com>2019-09-06 16:12:48 +0000
commitfd07568074689654e78ef38e700f9a019ffa42d3 (patch)
treedce2d9421648702da07a0abc5d2b771d8a4509f2 /clang/test/Sema/div-sizeof-array.cpp
parent4f0e429acca3b224b7b58fb89899c2de08a2e4c6 (diff)
downloadbcm5719-llvm-fd07568074689654e78ef38e700f9a019ffa42d3.tar.gz
bcm5719-llvm-fd07568074689654e78ef38e700f9a019ffa42d3.zip
[Diagnostics] Refactor code for -Wsizeof-pointer-div, catch more cases; also add -Wsizeof-array-div
Previously, -Wsizeof-pointer-div failed to catch: const int *r; sizeof(r) / sizeof(int); Now fixed. Also introduced -Wsizeof-array-div which catches bugs like: sizeof(r) / sizeof(short); (Array element type does not match type of sizeof operand). llvm-svn: 371222
Diffstat (limited to 'clang/test/Sema/div-sizeof-array.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud