diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-07 21:08:14 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-10-07 21:08:14 +0000 |
commit | 13bf6336ab395eb6af487ab96d32229460907769 (patch) | |
tree | 3257859051bcc03396f4e9edbd40812d1c21be80 /lib/Sema/SemaObjCProperty.cpp | |
parent | 63d3201619fdac284adfd3b9328562fa20a01c40 (diff) |
objc++: some minor cleanup and a test case
for atomic setters which requires assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 13ccf82cf4..7eb552c84a 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -805,15 +805,12 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, ObjCPropertyDecl::OBJC_PR_atomic) { Expr *callExpr = Res.takeAs<Expr>(); if (const CXXOperatorCallExpr *CXXCE = - dyn_cast_or_null<CXXOperatorCallExpr>(callExpr)) { - const CallExpr *CE = cast<CallExpr>(CXXCE); - if (const FunctionDecl *FuncDecl = CE->getDirectCallee()) { + dyn_cast_or_null<CXXOperatorCallExpr>(callExpr)) + if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee()) if (!FuncDecl->isTrivial()) Diag(PropertyLoc, diag::warn_atomic_property_nontrivial_assign_op) << property->getType(); - } - } } PIDecl->setSetterCXXAssignment(Res.takeAs<Expr>()); } |