2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
|
2010-05-18 22:24:06 +04:00
|
|
|
// RUN: %clang_cc1 -x objective-c++ -triple i386-apple-darwin9 -fsyntax-only -fobjc-gc -verify %s
|
2009-02-21 22:44:02 +03:00
|
|
|
struct S {
|
|
|
|
__weak id p; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
|
|
|
|
};
|
|
|
|
|
|
|
|
int main ()
|
|
|
|
{
|
2011-06-08 00:15:46 +04:00
|
|
|
__weak id local; // expected-warning {{Objective-C GC does not allow weak variables on the stack}}
|
2009-02-21 22:44:02 +03:00
|
|
|
}
|
|
|
|
|