mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 19:24:21 +00:00
22db4824b9
A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the third batch of tests being updated (there are a significant number of other tests left to be updated).
40 lines
955 B
Objective-C
40 lines
955 B
Objective-C
// RUN: %clang_cc1 -verify -Wno-objc-root-class -fsyntax-only %s
|
|
|
|
__attribute__((objc_nonlazy_class))
|
|
@interface A
|
|
@end
|
|
@implementation A
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class)) int X; // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
|
|
|
|
__attribute__((objc_nonlazy_class()))
|
|
@interface B
|
|
@end
|
|
@implementation B
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class("foo"))) // expected-error{{'objc_nonlazy_class' attribute takes no arguments}}
|
|
@interface C
|
|
@end
|
|
@implementation C
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
|
|
@protocol B
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies to Objective-C interfaces}}
|
|
void foo(void);
|
|
|
|
@interface E
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class))
|
|
@implementation E
|
|
@end
|
|
|
|
__attribute__((objc_nonlazy_class))
|
|
@implementation E (MyCat)
|
|
@end
|