John McCall | 8376037 | 2015-12-10 23:31:01 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only "-triple" "x86_64-apple-macosx10.10.0" -fobjc-runtime-has-weak -fobjc-weak %s -verify %s |
| 2 | |
| 3 | #define __strong |
| 4 | // expected-warning@-1 {{ignoring redefinition of Objective-C qualifier macro}} |
| 5 | #define __weak |
| 6 | // expected-warning@-1 {{ignoring redefinition of Objective-C qualifier macro}} |
| 7 | #define __unsafe_unretained |
| 8 | // expected-warning@-1 {{ignoring redefinition of Objective-C qualifier macro}} |
| 9 | #define __autoreleased |
| 10 | // No warning because this is the default expansion anyway. |
| 11 | |
| 12 | // Check that this still expands to the right text. |
| 13 | void test() { |
| 14 | goto label; // expected-error {{cannot jump from this goto statement to its label}} |
| 15 | __weak id x; // expected-note {{jump bypasses initialization of __weak variable}} |
| 16 | label: |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | #undef __strong |
| 21 | #define __strong |
| 22 | // No warning. |