зеркало из https://github.com/microsoft/clang-1.git
[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
This commit is contained in:
Родитель
95ed7784a3
Коммит
05a4652fe6
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче