diff options
Diffstat (limited to 'test/SemaObjC/arc-non-pod-memaccess.m')
-rw-r--r-- | test/SemaObjC/arc-non-pod-memaccess.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/SemaObjC/arc-non-pod-memaccess.m b/test/SemaObjC/arc-non-pod-memaccess.m index c9a77519694d3..2b1223abbe784 100644 --- a/test/SemaObjC/arc-non-pod-memaccess.m +++ b/test/SemaObjC/arc-non-pod-memaccess.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -verify -fblocks -triple x86_64-apple-darwin10.0.0 %s -// RUN: %clang_cc1 -x objective-c++ -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -verify -fblocks -triple x86_64-apple-darwin10.0.0 %s +// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -verify -fblocks -triple x86_64-apple-darwin10.0.0 %s +// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -verify -fblocks -triple x86_64-apple-darwin10.0.0 %s #ifdef __cplusplus extern "C" { @@ -53,3 +53,11 @@ void test(id __strong *sip, id __weak *wip, id __autoreleasing *aip, // expected-note{{explicitly cast the pointer to silence this warning}} memmove(ptr, uip, 17); } + +void rdar9772982(int i, ...) { + __builtin_va_list ap; + + __builtin_va_start(ap, i); + __builtin_va_arg(ap, __strong id); // expected-error{{second argument to 'va_arg' is of ARC ownership-qualified type '__strong id'}} + __builtin_va_end(ap); +} |