Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s |
Fariborz Jahanian | bf1ee34 | 2010-05-18 18:24:06 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s |
Fariborz Jahanian | 7b5b317 | 2009-02-21 19:44:02 +0000 | [diff] [blame] | 3 | struct S { |
| 4 | __weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}} |
| 5 | }; |
| 6 | |
| 7 | int main () |
| 8 | { |
Fariborz Jahanian | 175df89 | 2011-06-07 20:15:46 +0000 | [diff] [blame] | 9 | __weak id local; // expected-warning {{Objective-C GC does not allow weak variables on the stack}} |
Fariborz Jahanian | 7b5b317 | 2009-02-21 19:44:02 +0000 | [diff] [blame] | 10 | } |
| 11 | |