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
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 13ccf82..7eb552c 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -805,15 +805,12 @@
           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>());
     }