xref: /llvm-project/clang/test/SemaObjC/attr-swift_bridged_typedef.m (revision 7d26d6a1b062f7ce820b02b39d102d5f8f15fa5f)
1// RUN: %clang_cc1 -verify -fsyntax-only %s
2
3@interface NSString
4@end
5
6typedef NSString *NSStringAlias __attribute__((__swift_bridged_typedef__));
7
8typedef int IntAlias __attribute__((__swift_bridged_typedef__));
9
10struct __attribute__((swift_bridged_typedef)) S {};
11// expected-error@-1 {{'swift_bridged_typedef' attribute only applies to typedefs}}
12
13typedef unsigned char UnsignedChar __attribute__((__swift_bridged_typedef__("UnsignedChar")));
14// expected-error@-1 {{'__swift_bridged_typedef__' attribute takes no arguments}}
15