| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
|---|---|
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | @interface NSString @end |
| 5 | |
| 6 | typedef const struct __CFString * CFStringRef; |
| 7 | const NSString* fRef; |
| 8 | |
| 9 | CFStringRef func() { |
| 10 | return reinterpret_cast<CFStringRef>(fRef); |
| 11 | } |
| 12 | |
| 13 | CFStringRef fRef1; |
| 14 | |
| 15 | const NSString* func1() { |
| 16 | return reinterpret_cast<const NSString*>(fRef1); |
| 17 | } |
| 18 | |
| 19 | @interface I @end |
| 20 | const I *fRef2; |
| 21 | |
| 22 | const NSString* func2() { |
| 23 | return reinterpret_cast<const NSString*>(fRef2); |
| 24 | } |
| 25 |