1 // RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -DNOARC %s
4 // expected-no-diagnostics
7 @interface RetainableArray {
10 // expected-error@-2 {{ARC forbids flexible array members with retainable object type}}
14 @implementation RetainableArray
17 // Emit diagnostic only if have @implementation.
18 @interface RetainableArrayWithoutImpl {
23 // With ARC flexible array member objects can be only __unsafe_unretained
24 @interface UnsafeUnretainedArray {
25 __unsafe_unretained id flexible[];
28 @implementation UnsafeUnretainedArray
31 @interface NotObjCLifetimeTypeArray {
35 @implementation NotObjCLifetimeTypeArray