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
This commit is contained in:
Anna Zaks 2013-12-06 19:28:16 +00:00
parent cf8d2165ff
commit f5308fac1e
1 changed files with 6 additions and 0 deletions

View File

@ -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.