diff options
author | John McCall <rjmccall@apple.com> | 2011-03-26 02:56:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-26 02:56:45 +0000 |
commit | 2234873111009eb8655d63362cedc422eb9fc517 (patch) | |
tree | c6290ae77b59e7a592c50731b7460525fda22f9a /test/SemaObjC/attr-objc-gc.m | |
parent | 379246d29b1c7ef2659beadf41b4cb79806c0e63 (diff) | |
download | clang-2234873111009eb8655d63362cedc422eb9fc517.tar.gz |
Allow GC qualifiers to be added/removed by conversions from/to void*
without a warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/attr-objc-gc.m')
-rw-r--r-- | test/SemaObjC/attr-objc-gc.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaObjC/attr-objc-gc.m b/test/SemaObjC/attr-objc-gc.m index a826317415..9ca12c9315 100644 --- a/test/SemaObjC/attr-objc-gc.m +++ b/test/SemaObjC/attr-objc-gc.m @@ -17,3 +17,14 @@ static WEAK int h; // expected-warning {{'objc_gc' only applies to pointer types /* expected-warning {{'__weak' only applies to pointer types; type here is 'int'}}*/ static __we\ ak int i; + +// rdar://problem/9126213 +void test2(id __attribute((objc_gc(strong))) *strong, + id __attribute((objc_gc(weak))) *weak) { + void *opaque; + opaque = strong; + strong = opaque; + + opaque = weak; + weak = opaque; +} |