1 // RUN: %clang_cc1 -fsyntax-only -verify -Wattributes -Wobjc-root-class %s
2 @interface RootClass {} // expected-warning {{class 'RootClass' defined without specifying a base class}} \
3 // expected-note {{add a super class to fix this problem}}
5 @implementation RootClass
8 __attribute__((objc_root_class))
9 @interface NonRootClass : RootClass // expected-error {{objc_root_class attribute may only be specified on a root class declaration}}
11 @implementation NonRootClass
14 __attribute__((objc_root_class)) static void nonClassDeclaration(void) // expected-error {{'objc_root_class' attribute only applies to Objective-C interfaces}}
18 __attribute__((objc_root_class(1))) // expected-error {{'objc_root_class' attribute takes no arguments}}