diff options
author | Anna Zaks <ganna@apple.com> | 2013-12-06 19:28:16 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-12-06 19:28:16 +0000 |
commit | f5308fac1e8205a862fdcfe9e5c8f66cf3c9c4d3 (patch) | |
tree | 9e297d6e1395da950f3df802b922a068b7b10a6d /clang/test/Analysis/malloc.c | |
parent | cf8d2165ffebd254927463af7d86f61d8bbd3fd2 (diff) | |
download | bcm5719-llvm-f5308fac1e8205a862fdcfe9e5c8f66cf3c9c4d3.tar.gz bcm5719-llvm-f5308fac1e8205a862fdcfe9e5c8f66cf3c9c4d3.zip |
Fixup to r196593.
This is another regression fixed by reverting r189090.
In this case, the problem is not live variables but the approach that was taken in r189090. This regression was caused by explicitly binding "true" to the condition when we take the true branch. Normally that's okay, but in this case we're planning to reuse that condition as the value of the expression.
llvm-svn: 196599
Diffstat (limited to 'clang/test/Analysis/malloc.c')
-rw-r--r-- | clang/test/Analysis/malloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c index a0296cb0036..58d40a31a83 100644 --- a/clang/test/Analysis/malloc.c +++ b/clang/test/Analysis/malloc.c @@ -1290,6 +1290,12 @@ char *dupstrWarn(const char *s) { return p; } +int *radar15580979() { + int *data = (int *)malloc(32); + int *p = data ?: (int*)malloc(32); // no warning + return p; +} + // ---------------------------------------------------------------------------- // False negatives. |