diff --git a/xls/ir/value_view_test.cc b/xls/ir/value_view_test.cc index 21363cfe6d..a754e5c92f 100644 --- a/xls/ir/value_view_test.cc +++ b/xls/ir/value_view_test.cc @@ -116,7 +116,7 @@ TEST(PackedBitViewTest, ExtractsUnalignedReallyBigs) { BitsRope rope(kElementWidth + kBitOffset); for (int i = 0; i < kBitOffset; i++) { - rope.push_back(0); + rope.push_back(0); // NOLINT(modernize-use-bool-literals) } int current_bit = 0; int current_byte = 0; @@ -146,7 +146,7 @@ template absl::Status TestWidthAndOffset(int bit_offset) { BitsRope rope(kBitWidth + bit_offset); for (int i = 0; i < bit_offset; i++) { - rope.push_back(false); + rope.push_back(0); // NOLINT(modernize-use-bool-literals) } int current_bit = 0; int current_byte = 0; @@ -217,7 +217,7 @@ TEST(PackedArrayViewTest, ExtractsUnaligned) { BitsRope rope(kElementBits * kNumElements + kBitOffset); for (int i = 0; i < kBitOffset; i++) { - rope.push_back(0); + rope.push_back(0); // NOLINT(modernize-use-bool-literals) } // Fill the n'th element with n (for each element). @@ -252,7 +252,7 @@ TEST(PackedTupleViewTest, ExtractsSimpleUnaligned) { BitsRope rope(TupleT::kBitCount + kBitOffset); for (int i = 0; i < kBitOffset; i++) { - rope.push_back(0); + rope.push_back(0); // NOLINT(modernize-use-bool-literals) } // Iterate low-to-high, keeping LSb-first ordering. absl::Span elements = value.elements(); diff --git a/xls/netlist/function_parser.cc b/xls/netlist/function_parser.cc index c27d7df593..39e3d7a745 100644 --- a/xls/netlist/function_parser.cc +++ b/xls/netlist/function_parser.cc @@ -282,7 +282,7 @@ absl::StatusOr Parser::ParseInvertNext() { // see if we have an odd or even count and apply after processing the // following term. XLS_ASSIGN_OR_RETURN(Token token, scanner_.Peek()); - bool do_negate = 0; + bool do_negate = false; while (token.kind() == Token::Kind::kInvertFollowing) { XLS_RETURN_IF_ERROR(scanner_.Pop().status()); do_negate = !do_negate; diff --git a/xls/tools/eval_proc_main.cc b/xls/tools/eval_proc_main.cc index 0b01445dea..9999d4f4e4 100644 --- a/xls/tools/eval_proc_main.cc +++ b/xls/tools/eval_proc_main.cc @@ -467,7 +467,7 @@ struct ChannelInfo { int64_t width = -1; bool port_input = false; // Is this ready-valid? - bool ready_valid = 0; + bool ready_valid = false; // Precalculated channel names std::string channel_ready;