summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 9b0ccc9458a..a793d45da4e 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -9747,19 +9747,6 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc,
return ExprError();
}
- if (getLangOpts().OpenCL) {
- // OpenCLC v2.0 s6.13.11.8 forbids operations on atomic types.
- if (LHSExpr->getType()->isAtomicType() ||
- RHSExpr->getType()->isAtomicType()) {
- SourceRange SR(LHSExpr->getLocStart(), RHSExpr->getLocEnd());
- if (Opc == BO_Assign)
- Diag(OpLoc, diag::err_atomic_assignment) << SR;
- else
- ResultTy = InvalidOperands(OpLoc, LHS, RHS);
- return ExprError();
- }
- }
-
switch (Opc) {
case BO_Assign:
ResultTy = CheckAssignmentOperands(LHS.get(), RHS, OpLoc, QualType());
@@ -10232,15 +10219,6 @@ ExprResult Sema::CreateBuiltinUnaryOp(SourceLocation OpLoc,
ExprValueKind VK = VK_RValue;
ExprObjectKind OK = OK_Ordinary;
QualType resultType;
- if (getLangOpts().OpenCL) {
- // OpenCLC v2.0 s6.13.11.8, the only legal unary operation.
- // for atomics is '&'.
- if (Opc != UO_AddrOf && InputExpr->getType()->isAtomicType()) {
- return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
- << InputExpr->getType()
- << Input.get()->getSourceRange());
- }
- }
switch (Opc) {
case UO_PreInc:
case UO_PreDec:
OpenPOWER on IntegriCloud