[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / warn-weak-field.m
blobe7b0fe2694d675cba1473dfa225cbb6b5bf4660b
1 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify -Wno-objc-root-class %s
4 struct S {
5         __weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
6         __strong id p1;
7 };
9 @interface I
11    __weak id w; // OK
12    __strong id LHS;
14 - (void) foo;
15 @end
16 @implementation I
17 - (void) foo { w = 0; LHS = w; }
18 @end
20 int main ()
22         struct I {
23         __weak id w1;  // expected-warning {{__weak attribute cannot be specified on a field declaration}}
24         };