diff options
author | Anna Zaks <ganna@apple.com> | 2012-01-13 00:56:48 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-01-13 00:56:48 +0000 |
commit | 622813009955259a084a1fc3f0816c00d89cf12d (patch) | |
tree | dbd317d4fc0e830674c59a5365136221388b80f3 /clang/test/Analysis/string.c | |
parent | bdf42b336d9df44c51a1377c585730e46fbc0e5c (diff) | |
download | bcm5719-llvm-622813009955259a084a1fc3f0816c00d89cf12d.tar.gz bcm5719-llvm-622813009955259a084a1fc3f0816c00d89cf12d.zip |
[analyzer] RegionStoreManager::getBinding() should not crash when
looking up value at a CodeTextRegion even when the type is not provided.
llvm-svn: 148079
Diffstat (limited to 'clang/test/Analysis/string.c')
-rw-r--r-- | clang/test/Analysis/string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Analysis/string.c b/clang/test/Analysis/string.c index fcbe298a8fe..d72abb349a5 100644 --- a/clang/test/Analysis/string.c +++ b/clang/test/Analysis/string.c @@ -297,6 +297,10 @@ void strcpy_fn(char *x) { strcpy(x, (char*)&strcpy_fn); // expected-warning{{Argument to string copy function is the address of the function 'strcpy_fn', which is not a null-terminated string}} } +void strcpy_fn_const(char *x) { + strcpy(x, (const char*)&strcpy_fn); // expected-warning{{Argument to string copy function is the address of the function 'strcpy_fn', which is not a null-terminated string}} +} + void strcpy_effects(char *x, char *y) { char a = x[0]; |