aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-27 21:15:48 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-27 21:15:48 +0000
commit05a4652fe679939b4641f967bdf900fce3cb56c3 (patch)
tree2a18493110734ea1cebc416200f1d68309ce5c9d
parent95ed7784a335aca53b0c6e952cf31a4cfb633360 (diff)
[analyzer] Add test case for handling of __bridge_transfer that previously resulted in a 'stack address' warning (that was fixed in r138616). Fixes <rdar://problem/10018376>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138710 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/objc-arc.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/objc-arc.m b/test/Analysis/objc-arc.m
index 6b22fd099b..8e18877f29 100644
--- a/test/Analysis/objc-arc.m
+++ b/test/Analysis/objc-arc.m
@@ -147,3 +147,9 @@ void test_objc_unretainedObject() {
(void) x;
}
+// Previously this resulted in a "return of stack address" warning.
+id test_return() {
+ id x = (__bridge_transfer id) CFCreateString();
+ return x; // no-warning
+}
+