llvm-project/clang/test/SemaObjC/warn-weak-field.m

14 lines
319 B
Mathematica
Raw Normal View History

// RUN: clang -fsyntax-only -fobjc-gc -verify %s
struct S {
__weak id w; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
__strong id p1;
};
int main ()
{
struct I {
__weak id w1; // expected-warning {{__weak attribute cannot be specified on a field declaration}}
};
}