[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / subclassing-restricted-attr.m
blobd0db5e452f0478ab52a49d7e1abda20a19327241
1 // RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2 // RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
3 // rdar://16560476
5 __attribute__((objc_subclassing_restricted))
6 @interface Leaf // okay
7 @end
9 __attribute__((objc_subclassing_restricted))
10 @interface SubClassOfLeaf : Leaf // expected-note {{class is declared here}}
11 @end
14 @interface SubClass : SubClassOfLeaf // expected-error {{cannot subclass a class that was declared with the 'objc_subclassing_restricted' attribute}}
15 @end
17 __attribute__((objc_root_class))
18 @interface PlainRoot
19 @end
21 __attribute__((objc_subclassing_restricted))
22 @interface Sub2Class : PlainRoot // okay
23 @end
25 // rdar://28753587
26 __attribute__((objc_subclassing_restricted))
27 @interface SuperImplClass // expected-note {{class is declared here}}
28 @end
29 @implementation SuperImplClass
30 @end
32 __attribute__((objc_subclassing_restricted))
33 @interface SubImplClass : SuperImplClass
34 @end
35 @implementation SubImplClass // expected-error {{cannot subclass a class that was declared with the 'objc_subclassing_restricted' attribute}}
36 @end