summaryrefslogtreecommitdiff
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
commit6df32e24975ab457fa4b428326076436e48dad06 (patch)
treeabdd7ef85632119159d3e067139259196e01a6c2
parentdd9e9cec6f863afa15dd91b34fbf15c66c678c02 (diff)
downloadclang-6df32e24975ab457fa4b428326076436e48dad06.tar.gz
clang-6df32e24975ab457fa4b428326076436e48dad06.tar.bz2
clang-6df32e24975ab457fa4b428326076436e48dad06.tar.xz
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. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196796 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c
index a0296cb003..58d40a31a8 100644
--- a/test/Analysis/malloc.c
+++ b/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.