diff options
author | John McCall <rjmccall@apple.com> | 2011-10-25 17:37:35 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-10-25 17:37:35 +0000 |
commit | 526ab47a5573422765ac6c55147dfad00f1d703d (patch) | |
tree | 58636c95b687a767306b7ebc1d8bdf76dcd917ae /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | c0ecd1f7edf7655540781cdb979f0363ec17da0f (diff) | |
download | bcm5719-llvm-526ab47a5573422765ac6c55147dfad00f1d703d.tar.gz bcm5719-llvm-526ab47a5573422765ac6c55147dfad00f1d703d.zip |
Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.
llvm-svn: 142931
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 7e9bb46cd60..617dbefadaf 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -800,9 +800,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, SelfExpr, true, true); ObjCMethodDecl::param_iterator P = setterMethod->param_begin(); ParmVarDecl *Param = (*P); - QualType T = Param->getType(); - if (T->isReferenceType()) - T = T->getAs<ReferenceType>()->getPointeeType(); + QualType T = Param->getType().getNonReferenceType(); Expr *rhs = new (Context) DeclRefExpr(Param, T, VK_LValue, SourceLocation()); ExprResult Res = BuildBinOp(S, lhs->getLocEnd(), @@ -954,8 +952,8 @@ bool Sema::DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *property, ObjCMethodDecl *GetterMethod, SourceLocation Loc) { if (GetterMethod && - GetterMethod->getResultType().getNonReferenceType() - != property->getType().getNonReferenceType()) { + !Context.hasSameType(GetterMethod->getResultType().getNonReferenceType(), + property->getType().getNonReferenceType())) { AssignConvertType result = Incompatible; if (property->getType()->isObjCObjectPointerType()) result = CheckAssignmentConstraints(Loc, GetterMethod->getResultType(), |