@@ -105,7 +105,7 @@ static void printOperandAndTypeList(OpAsmPrinter &p, OperandRange operands) {
105
105
// / Print data variables corresponding to a data-sharing clause `name`
106
106
static void printDataVars (OpAsmPrinter &p, OperandRange operands,
107
107
StringRef name) {
108
- if (operands.size ()) {
108
+ if (! operands.empty ()) {
109
109
p << name;
110
110
printOperandAndTypeList (p, operands);
111
111
}
@@ -390,7 +390,7 @@ static void printReductionVarList(OpAsmPrinter &p,
390
390
static LogicalResult verifyReductionVarList (Operation *op,
391
391
Optional<ArrayAttr> reductions,
392
392
OperandRange reductionVars) {
393
- if (reductionVars.size () != 0 ) {
393
+ if (! reductionVars.empty () ) {
394
394
if (!reductions || reductions->size () != reductionVars.size ())
395
395
return op->emitOpError ()
396
396
<< " expected as many reduction symbol references "
@@ -863,7 +863,7 @@ static ParseResult parseClauses(OpAsmParser &parser, OperationState &result,
863
863
schedule[0 ] = llvm::toUpper (schedule[0 ]);
864
864
auto attr = parser.getBuilder ().getStringAttr (schedule);
865
865
result.addAttribute (" schedule_val" , attr);
866
- if (modifiers.size () > 0 ) {
866
+ if (! modifiers.empty () ) {
867
867
auto mod = parser.getBuilder ().getStringAttr (modifiers[0 ]);
868
868
result.addAttribute (" schedule_modifier" , mod);
869
869
// Only SIMD attribute is allowed here!
@@ -1072,7 +1072,7 @@ static void printWsLoopOp(OpAsmPrinter &p, WsLoopOp op) {
1072
1072
printDataVars (p, op.firstprivate_vars (), " firstprivate" );
1073
1073
printDataVars (p, op.lastprivate_vars (), " lastprivate" );
1074
1074
1075
- if (op.linear_vars ().size ())
1075
+ if (! op.linear_vars ().empty ())
1076
1076
printLinearClause (p, op.linear_vars (), op.linear_step_vars ());
1077
1077
1078
1078
if (auto sched = op.schedule_val ())
0 commit comments