diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 |
commit | bab175ec4b075c8076ba14c762900392533f6ee4 (patch) | |
tree | 01f4f29419a2cb10abe13c1e63cd2a66068b0137 /lib/Sema/SemaPseudoObject.cpp | |
parent | 8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff) |
Notes
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index c93d800f96d1e..8e53fda846f4e 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -661,7 +661,7 @@ bool ObjCPropertyOpBuilder::findSetter(bool warn) { if (ObjCPropertyDecl *prop1 = IFace->FindPropertyDeclaration( AltMember, prop->getQueryKind())) if (prop != prop1 && (prop1->getSetterMethodDecl() == setter)) { - S.Diag(RefExpr->getExprLoc(), diag::error_property_setter_ambiguous_use) + S.Diag(RefExpr->getExprLoc(), diag::err_property_setter_ambiguous_use) << prop << prop1 << setter->getSelector(); S.Diag(prop->getLocation(), diag::note_property_declare); S.Diag(prop1->getLocation(), diag::note_property_declare); @@ -770,7 +770,8 @@ ExprResult ObjCPropertyOpBuilder::buildSet(Expr *op, SourceLocation opcLoc, ExprResult opResult = op; Sema::AssignConvertType assignResult = S.CheckSingleAssignmentConstraints(paramType, opResult); - if (S.DiagnoseAssignmentResult(assignResult, opcLoc, paramType, + if (opResult.isInvalid() || + S.DiagnoseAssignmentResult(assignResult, opcLoc, paramType, op->getType(), opResult.get(), Sema::AA_Assigning)) return ExprError(); @@ -1103,8 +1104,9 @@ Sema::ObjCSubscriptKind Diag(FromE->getExprLoc(), diag::err_objc_multiple_subscript_type_conversion) << FromE->getType(); for (unsigned int i = 0; i < ConversionDecls.size(); i++) - Diag(ConversionDecls[i]->getLocation(), diag::not_conv_function_declared_at); - + Diag(ConversionDecls[i]->getLocation(), + diag::note_conv_function_declared_at); + return OS_Error; } @@ -1479,7 +1481,7 @@ ExprResult MSPropertyOpBuilder::buildGet() { SourceLocation(), GetterName, nullptr); if (GetterExpr.isInvalid()) { S.Diag(RefExpr->getMemberLoc(), - diag::error_cannot_find_suitable_accessor) << 0 /* getter */ + diag::err_cannot_find_suitable_accessor) << 0 /* getter */ << RefExpr->getPropertyDecl(); return ExprError(); } @@ -1508,7 +1510,7 @@ ExprResult MSPropertyOpBuilder::buildSet(Expr *op, SourceLocation sl, SourceLocation(), SetterName, nullptr); if (SetterExpr.isInvalid()) { S.Diag(RefExpr->getMemberLoc(), - diag::error_cannot_find_suitable_accessor) << 1 /* setter */ + diag::err_cannot_find_suitable_accessor) << 1 /* setter */ << RefExpr->getPropertyDecl(); return ExprError(); } |