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

llvm-svn: 138710
This commit is contained in:
Ted Kremenek 2011-08-27 21:15:48 +00:00
parent 3a039e339f
commit 6eb83cfacd
1 changed files with 6 additions and 0 deletions

View File

@ -147,3 +147,9 @@ void test_objc_unretainedObject() {
(void) x; (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
}