From 540d054b121d487ebbeefc6a21ce1fb1d3c1b9df Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Mon, 29 Aug 2022 12:08:00 +0000 Subject: [PATCH] Apply clang-tidy fixes for readability-simplify-boolean-expr in AttrOrTypeFormatGen.cpp (NFC) --- mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp b/mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp index c249e23..7449b10 100644 --- 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, -- 2.7.4