xref: /llvm-project/clang/test/SemaObjCXX/bridge-cast-redecl.mm (revision 803b79221edfc2517e6bfc373e5f55609565b0e4)
1// RUN: %clang_cc1 -std=gnu++17 -verify %s
2
3// expected-no-diagnostics
4
5typedef const struct __CFString * CFStringRef;
6
7extern "C" {
8  typedef const struct __attribute__((objc_bridge(NSString))) __CFString * CFStringRef;
9  typedef struct __attribute__((objc_bridge_mutable(NSMutableString))) __CFString * CFMutableStringRef;
10}
11
12@interface NSString @end
13@interface NSMutableString : NSString @end
14
15void CFStringGetLength(CFStringRef theString);
16
17int main() {
18  CFStringGetLength((__bridge CFStringRef)(NSString *)0);
19}
20