aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-12-09 18:37:20 +0000
committerBill Wendling <isanbard@gmail.com>2013-12-09 18:37:20 +0000
commit4141aeeb71a363b7f47e2fd20c4ef9fb85c3e22e (patch)
tree1fb99f76bf87a397fcdf30c0232b14701eb5ae8d /clang/test
parent6e477ccc5f358a7c4a0c60a46fd4486768d05e61 (diff)
downloadllvm-4141aeeb71a363b7f47e2fd20c4ef9fb85c3e22e.zip
llvm-4141aeeb71a363b7f47e2fd20c4ef9fb85c3e22e.tar.gz
llvm-4141aeeb71a363b7f47e2fd20c4ef9fb85c3e22e.tar.bz2
Merging r196599:
------------------------------------------------------------------------ r196599 | zaks | 2013-12-06 11:28:16 -0800 (Fri, 06 Dec 2013) | 5 lines 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: 196796
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c
index a0296cb..58d40a3 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.