blob: b85f7682a96b5eb37e94473c7037652d3564b48d [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
Fariborz Jahanianbf1ee342010-05-18 18:24:06 +00002// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
Fariborz Jahanian7b5b3172009-02-21 19:44:02 +00003struct S {
4 __weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
5};
6
7int main ()
8{
Fariborz Jahanian175df892011-06-07 20:15:46 +00009 __weak id local; // expected-warning {{Objective-C GC does not allow weak variables on the stack}}
Fariborz Jahanian7b5b3172009-02-21 19:44:02 +000010}
11