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