> On Jun 11, 2014, at 9:52 AM, Fariborz Jahanian <[email protected]> wrote:
>
> Added: cfe/trunk/test/SemaObjC/objc-mixed-bridge-attribute.m
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/objc-mixed-bridge-attribute.m?rev=210660&view=auto
> ==============================================================================
> --- cfe/trunk/test/SemaObjC/objc-mixed-bridge-attribute.m (added)
> +++ cfe/trunk/test/SemaObjC/objc-mixed-bridge-attribute.m Wed Jun 11 11:52:44
> 2014
> @@ -0,0 +1,26 @@
> +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
> +// expected-no-diagnostics
> +// rdar://17238954
> +
> +typedef const struct __attribute__((objc_bridge(NSAttributedString)))
> __CFAttributedString *CFAttributedStringRef;
> +
> +typedef struct
> __attribute__((objc_bridge_mutable(NSMutableAttributedString)))
> __CFAttributedString *CFMutableAttributedStringRef;
> +
> +@interface NSAttributedString
> +@end
> +
> +@interface NSMutableAttributedString
> +@end
> +
> +struct __CFAttributedString {
> +};
> +
> +void Test1(CFAttributedStringRef attrStr)
> +{
> + id x = (NSAttributedString *) attrStr; // no warning
> +}
> +
> +void Test2(NSAttributedString *attrStr) {
> + CFAttributedStringRef cfsr = (CFAttributedStringRef) attrStr;
> +}
> +
>
Could you expand the test with all the different permutations ? Specifically
test:
(NSAttributedString *) CFAttributedStringRef
(NSAttributedString *) CFMutableAttributedStringRef
(NSMutableAttributedString *) CFAttributedStringRef
(NSMutableAttributedString *) CFMutableAttributedStringRef
(CFAttributedStringRef) NSAttributedString *
(CFAttributedStringRef) NSMutableAttributedString *
(CFMutableAttributedStringRef) NSAttributedString *
(CFMutableAttributedStringRef) NSMutableAttributedString *
then also repeat the above with another set of types _without_ the presence of
the internal struct definition (without the equivalent "struct
__CFAttributedString {};”)_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits