summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjCXX/objcbridge-related-attribute.mm
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-12-09 22:04:26 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-12-09 22:04:26 +0000
commit67379e25c6b3a6a23f960115604cd0214ad08adc (patch)
tree1b8ba81edef412153b0c1531f20e0b18040e1808 /clang/test/SemaObjCXX/objcbridge-related-attribute.mm
parent7b6f9ba572f9e113e88e82407390d23bd39de730 (diff)
downloadbcm5719-llvm-67379e25c6b3a6a23f960115604cd0214ad08adc.tar.gz
bcm5719-llvm-67379e25c6b3a6a23f960115604cd0214ad08adc.zip
Objective-C: Improve on various diagnostics related to
use of objc_bridge_related attribute. // rdar://15499111 llvm-svn: 196828
Diffstat (limited to 'clang/test/SemaObjCXX/objcbridge-related-attribute.mm')
-rw-r--r--clang/test/SemaObjCXX/objcbridge-related-attribute.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/SemaObjCXX/objcbridge-related-attribute.mm b/clang/test/SemaObjCXX/objcbridge-related-attribute.mm
index 787e94081d7..4270b2b8c07 100644
--- a/clang/test/SemaObjCXX/objcbridge-related-attribute.mm
+++ b/clang/test/SemaObjCXX/objcbridge-related-attribute.mm
@@ -14,18 +14,18 @@ typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGCo
NSColor *Test1(NSColor *nsColor, CGColorRef newColor) {
- nsColor = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *', use 'colorWithCGColor:' method for this conversion}}
- NSColor *ns = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *', use 'colorWithCGColor:' method for this conversion}} \
+ nsColor = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ NSColor *ns = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}} \
// expected-error {{cannot initialize a variable of type 'NSColor *' with an lvalue of type 'CGColorRef' (aka 'CGColor *')}}
- return newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *', use 'colorWithCGColor:' method for this conversion}} \
+ return newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}} \
// expected-error {{cannot initialize return object of type 'NSColor *' with an lvalue of type 'CGColorRef' (aka 'CGColor *')}}
}
CGColorRef Test2(NSColor *newColor, CGColorRef cgColor) {
- cgColor = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'), use 'CGColor' method for this conversion}}
- CGColorRef cg = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'), use 'CGColor' method for this conversion}} \
+ cgColor = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}}
+ CGColorRef cg = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}} \
// expected-error {{cannot initialize a variable of type 'CGColorRef' (aka 'CGColor *') with an lvalue of type 'NSColor *'}}
- return newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'), use 'CGColor' method for this conversion}}\
+ return newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}}\
// expected-error {{cannot initialize return object of type 'CGColorRef' (aka 'CGColor *') with an lvalue of type 'NSColor *'}}
}
OpenPOWER on IntegriCloud