blob: 52989f960caa9c0ec564c842416e630ecf919568 [file] [log] [blame]
Fariborz Jahanian87c77912013-11-21 20:50:32 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2// rdar://15498044
3
4typedef struct __attribute__((objc_bridge_mutable(NSMutableDictionary))) __CFDictionary * CFMutableDictionaryRef; // expected-note {{declared here}}
5
6@interface NSDictionary
7@end
8
9@interface NSMutableDictionary : NSDictionary
10@end
11
12void Test(NSMutableDictionary *md, NSDictionary *nd, CFMutableDictionaryRef mcf) {
13
14 (void) (CFMutableDictionaryRef)md;
15 (void) (CFMutableDictionaryRef)nd; // expected-warning {{'NSDictionary' cannot bridge to 'CFMutableDictionaryRef' (aka 'struct __CFDictionary *')}}
16 (void) (NSDictionary *)mcf; // expected-warning {{'CFMutableDictionaryRef' (aka 'struct __CFDictionary *') bridges to NSMutableDictionary, not 'NSDictionary'}}
17 (void) (NSMutableDictionary *)mcf; // ok;
18}
19