diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-10 00:37:01 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-01-10 00:37:01 +0000 |
commit | 20abee6b95c4f5a61e471b4b616439280ca4a81b (patch) | |
tree | 7b5740db1468b4c87b90502c5eecd90e26b2e88b /lib/Sema/SemaObjCProperty.cpp | |
parent | d18840d1e27c1b9c27bb74923b87f8ae33ec4736 (diff) |
objc++: patch for IRgen for atomic properties of
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 6379c924e2..bbc6d23385 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -830,9 +830,13 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, dyn_cast_or_null<CXXOperatorCallExpr>(callExpr)) if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee()) if (!FuncDecl->isTrivial()) - Diag(PropertyLoc, - diag::warn_atomic_property_nontrivial_assign_op) + if (property->getType()->isReferenceType()) { + Diag(PropertyLoc, + diag::err_atomic_property_nontrivial_assign_op) << property->getType(); + Diag(FuncDecl->getLocStart(), + diag::note_callee_decl) << FuncDecl; + } } PIDecl->setSetterCXXAssignment(Res.takeAs<Expr>()); } |