hanchenye-llvm-project/clang/test/Parser/c2x-attributes.m

22 lines
327 B
Objective-C

// RUN: %clang_cc1 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
// expected-no-diagnostics
enum __attribute__((deprecated)) E1 : int; // ok
enum [[deprecated]] E2 : int;
@interface Base
@end
@interface S : Base
- (void) bar;
@end
@interface T : Base
- (S *) foo;
@end
void f(T *t) {
[[]][[t foo] bar];
}