blob: 5dc88f7935ebd027321f712e9672f0ad89fe6e4f [file] [log] [blame]
Joe Danielsf7393d22019-02-04 23:32:55 +00001// RUN: %clang_cc1 -verify -Wno-objc-root-class -fsyntax-only %s
2
3__attribute__((objc_nonlazy_class))
4@interface A
5@end
6@implementation A
7@end
8
9__attribute__((objc_nonlazy_class)) int X; // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
10
11__attribute__((objc_nonlazy_class()))
12@interface B
13@end
14@implementation B
15@end
16
17__attribute__((objc_nonlazy_class("foo"))) // expected-error{{'objc_nonlazy_class' attribute takes no arguments}}
18@interface C
19@end
20@implementation C
21@end
22
23__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
24@protocol B
25@end
26
27__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
28void foo();
29
30@interface E
31@end
32__attribute__((objc_nonlazy_class))
33@implementation E // expected-error {{prefix attribute must be followed by an interface or protocol}}
34@end