From 38f44963ba114ae7eba9956e14c8e4bd2bbaf058 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 28 Oct 2023 10:48:46 +0000 Subject: [PATCH] style: pre-commit fixes --- tools/netlist/include/Debug.h | 18 +++++++++--------- tools/netlist/include/NetlistVisitor.h | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/tools/netlist/include/Debug.h b/tools/netlist/include/Debug.h index 111877cf7..ed2c78402 100644 --- a/tools/netlist/include/Debug.h +++ b/tools/netlist/include/Debug.h @@ -7,20 +7,20 @@ //------------------------------------------------------------------------------ #pragma once -#include - #include "Config.h" +#include namespace netlist { -template -void DebugMessage(const char *filename, const int line, fmt::format_string fmt, T &&...args) { - fmt::print("{}:{}: ", filename, line); - fmt::print(fmt, std::forward(args)...); +template +void DebugMessage(const char* filename, const int line, fmt::format_string fmt, T&&... args) { + fmt::print("{}:{}: ", filename, line); + fmt::print(fmt, std::forward(args)...); } -template void InfoMessage(fmt::format_string fmt, T &&...args) { - fmt::print(fmt, std::forward(args)...); +template +void InfoMessage(fmt::format_string fmt, T&&... args) { + fmt::print(fmt, std::forward(args)...); } } // namespace netlist @@ -35,6 +35,6 @@ template void InfoMessage(fmt::format_string fmt, T &&...a #endif #define INFO_PRINT(str, ...) \ - if (!Config::getInstance().quietEnabled) { \ + if (!Config::getInstance().quietEnabled) { \ InfoMessage(str __VA_OPT__(, ) __VA_ARGS__); \ } diff --git a/tools/netlist/include/NetlistVisitor.h b/tools/netlist/include/NetlistVisitor.h index 688772658..4c280e45d 100644 --- a/tools/netlist/include/NetlistVisitor.h +++ b/tools/netlist/include/NetlistVisitor.h @@ -111,10 +111,12 @@ class VariableReferenceVisitor : public ast::ASTVisitorgetType()); node.bounds = {static_cast(bounds->first), static_cast(bounds->second)}; - } else { + } + else { node.bounds = {0, getTypeBitWidth(expr.symbol.getType()) - 1}; } - DEBUG_PRINT("Variable reference: {} bounds {}:{}\n", node.toString(), node.bounds.lower(), node.bounds.upper()); + DEBUG_PRINT("Variable reference: {} bounds {}:{}\n", node.toString(), node.bounds.lower(), + node.bounds.upper()); // Clear the selectors for the next named value. selectors.clear();