def err_objc_bridged_related_invalid_class_name : Error<
"%0 must be name of an Objective-C class to be able to convert %1 to %2">;
def err_objc_bridged_related_unknown_method : Error<
- "%0 cannot be directly converted to %1; specify "
- "%select{a class|an instance}2 method in objc_bridge_related attribute"
- " for this conversion">;
+ "%0 cannot be directly converted to %1">;
def err_objc_bridged_related_known_method : Error<
"%0 must be explicitly converted to %1; use %select{%objcclass2|%objcinstance2}3 "
"method for this conversion">;
}
else
Diag(Loc, diag::err_objc_bridged_related_unknown_method)
- << SrcType << DestType << false;
+ << SrcType << DestType;
Diag(RelatedClass->getLocStart(), diag::note_declared_at);
Diag(TDNDecl->getLocStart(), diag::note_declared_at);
}
}
else
Diag(Loc, diag::err_objc_bridged_related_unknown_method)
- << SrcType << DestType << true;
+ << SrcType << DestType;
Diag(RelatedClass->getLocStart(), diag::note_declared_at);
Diag(TDNDecl->getLocStart(), diag::note_declared_at);
}
}
NSColor * Test2(NSTextField *textField, CGColorRef1 newColor) {
- foo(newColor); // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'; specify a class method in objc_bridge_related attribute for this conversion}}
- textField.backgroundColor = newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *__strong'; specify a class method in objc_bridge_related attribute for this conversion}}
- return newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'; specify a class method in objc_bridge_related attribute for this conversion}}
+ foo(newColor); // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'}}
+ textField.backgroundColor = newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *__strong'}}
+ return newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'}}
}
CGColorRef Test3(NSTextField *textField, CGColorRef newColor) {
}
CGColorRef2 Test4(NSTextField *textField, CGColorRef2 newColor) {
- newColor = textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *'); specify an instance method in objc_bridge_related attribute for this conversion}}
- return textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *'); specify an instance method in objc_bridge_related attribute for this conversion}}
+ newColor = textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *')}}
+ return textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *')}}
}
}
NSColor * Test2(NSTextField *textField, CGColorRef1 newColor) {
- foo(newColor); // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'; specify a class method in objc_bridge_related attribute for this conversion}}
- textField.backgroundColor = newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'; specify a class method in objc_bridge_related attribute for this conversion}}
- return newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'; specify a class method in objc_bridge_related attribute for this conversion}}
+ foo(newColor); // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'}}
+ textField.backgroundColor = newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'}}
+ return newColor; // expected-error {{'CGColorRef1' (aka 'struct CGColor1 *') cannot be directly converted to 'NSColor *'}}
}
CGColorRef Test3(NSTextField *textField, CGColorRef newColor) {
}
CGColorRef2 Test4(NSTextField *textField, CGColorRef2 newColor) {
- newColor = textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *'); specify an instance method in objc_bridge_related attribute for this conversion}}
- return textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *'); specify an instance method in objc_bridge_related attribute for this conversion}}
+ newColor = textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *')}}
+ return textField.backgroundColor; // expected-error {{'NSColor *' cannot be directly converted to 'CGColorRef2' (aka 'struct CGColor2 *')}}
}