aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp7
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>());
}