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:
4bd6679
)
Apply clang-tidy fixes for readability-simplify-boolean-expr in AttrOrTypeFormatGen...
author
Mehdi Amini
<joker.eph@gmail.com>
Mon, 29 Aug 2022 12:08:00 +0000
(12:08 +0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Mon, 12 Sep 2022 22:58:11 +0000
(22:58 +0000)
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
patch
|
blob
|
history
diff --git
a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
index
c249e23
..
7449b10
100644
(file)
--- a/
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
+++ b/
mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
@@
-747,7
+747,7
@@
void DefFormat::genLiteralPrinter(StringRef value, FmtContext &ctx,
// Update the flags.
shouldEmitSpace =
value.size() != 1 || !StringRef("<({[").contains(value.front());
- lastWasPunctuation =
!(value.front() == '_' || isalpha(value.front()
));
+ lastWasPunctuation =
value.front() != '_' && !isalpha(value.front(
));
}
void DefFormat::genVariablePrinter(ParameterElement *el, FmtContext &ctx,