projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
389e0a8
)
[mlir][OpenMP] Apply ClangTidy readability finding.
author
Adrian Kuegel
<akuegel@google.com>
Wed, 31 Aug 2022 08:38:19 +0000
(10:38 +0200)
committer
Adrian Kuegel
<akuegel@google.com>
Wed, 31 Aug 2022 08:38:19 +0000
(10:38 +0200)
Use .empty() check instead of size() check.
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
b/mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
index
b4e05c5
..
46f1ed3
100644
(file)
--- a/
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+++ b/
mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
@@
-707,7
+707,7
@@
LogicalResult TaskLoopOp::verify() {
verifyReductionVarList(*this, in_reductions(), in_reduction_vars())))
return failure();
- if (
reduction_vars().size() > 0
&& nogroup())
+ if (
!reduction_vars().empty()
&& nogroup())
return emitError("if a reduction clause is present on the taskloop "
"directive, the nogroup clause must not be specified");
for (auto var : reduction_vars()) {