Skip to content

Commit

Permalink
clang-format ...
Browse files Browse the repository at this point in the history
  • Loading branch information
gitoleg committed Apr 16, 2024
1 parent 00eb882 commit 3193337
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions clang/lib/CIR/Dialect/IR/CIRDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2773,15 +2773,17 @@ LogicalResult BinOp::verify() {
bool noWrap = getNoUnsignedWrap() || getNoSignedWrap();

if (!isa<mlir::cir::IntType>(getType()) && noWrap)
return emitError() << "only operations on integer values may have nsw/nuw flags";

bool noWrapOps = getKind() == mlir::cir::BinOpKind::Add
|| getKind() == mlir::cir::BinOpKind::Sub
|| getKind() == mlir::cir::BinOpKind::Mul;
return emitError()
<< "only operations on integer values may have nsw/nuw flags";

bool noWrapOps = getKind() == mlir::cir::BinOpKind::Add ||
getKind() == mlir::cir::BinOpKind::Sub ||
getKind() == mlir::cir::BinOpKind::Mul;

if (noWrap && !noWrapOps)
return emitError() << "The nsw/nuw flags are applicable to Add, Sub and Mul operations only";

return emitError() << "The nsw/nuw flags are applicable to Add, Sub and "
"Mul operations only";

return mlir::success();
}

Expand Down

0 comments on commit 3193337

Please sign in to comment.