diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-03-13 17:55:39 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-03-13 17:55:39 +0000 |
commit | 821a3a0f77052fee77bd86f241fe6a7740f59549 (patch) | |
tree | 7c5e03f29e6b677f0183272e0696f10e6675cb0f /clang/lib/Sema/TreeTransform.h | |
parent | 11765bce2de81fd3365436524c966d0457556846 (diff) | |
download | bcm5719-llvm-821a3a0f77052fee77bd86f241fe6a7740f59549.tar.gz bcm5719-llvm-821a3a0f77052fee77bd86f241fe6a7740f59549.zip |
[analyzer] Warn when passing pointers to const but uninitialized memory.
Passing a pointer to an uninitialized memory buffer is normally okay,
but if the function is declared to take a pointer-to-const then it's
very unlikely it will be modifying the buffer. In this case the analyzer
should warn that there will likely be a read of uninitialized memory.
This doesn't check all elements of an array, only the first one.
It also doesn't yet check Objective-C methods, only C functions and
C++ methods.
This is controlled by a new check: alpha.core.CallAndMessageUnInitRefArg.
Patch by Per Viberg!
llvm-svn: 203822
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
0 files changed, 0 insertions, 0 deletions