Skip to content

Commit

Permalink
Add modernize-redundant-void-arg check to clang-tidy (phate#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
phate authored Dec 21, 2024
1 parent 0ac4805 commit 4821290
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 62 deletions.
2 changes: 2 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
Checks: '-*,
modernize-deprecated-headers,
modernize-redundant-void-arg,
'

WarningsAsErrors: '
modernize-deprecated-headers,
modernize-redundant-void-arg,
'
2 changes: 1 addition & 1 deletion jlm/rvsdg/binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ flattened_binary_operation_get_default_normal_form_(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::binary_op),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/bitstring/concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ get_default_normal_form(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::bitconcat_op),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/gamma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ gamma_node_get_default_normal_form_(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::GammaOperation),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ node_get_default_normal_form_(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::Operation),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/nullary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ nullary_operation_get_default_normal_form_(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::nullary_op),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/simple-normal-form.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ get_default_normal_form(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::SimpleOperation),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/statemux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ create_mux_normal_form(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::mux_op),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/structural-normal-form.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ get_default_normal_form(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::StructuralOperation),
Expand Down
2 changes: 1 addition & 1 deletion jlm/rvsdg/unary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ unary_operation_get_default_normal_form_(
}

static void __attribute__((constructor))
register_node_normal_form(void)
register_node_normal_form()
{
jlm::rvsdg::node_normal_form::register_factory(
typeid(jlm::rvsdg::unary_op),
Expand Down
4 changes: 2 additions & 2 deletions jlm/util/intrusive-hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class intrusive_hash
{}

inline const iterator &
operator++(void) noexcept
operator++() noexcept
{
ElementType * next = map_->accessor_.get_next(element_);
if (next == nullptr)
Expand Down Expand Up @@ -262,7 +262,7 @@ class intrusive_hash
{}

inline const const_iterator &
operator++(void) noexcept
operator++() noexcept
{
ElementType * next = map_->accessor_.get_next(element_);
if (next == nullptr)
Expand Down
8 changes: 4 additions & 4 deletions jlm/util/intrusive-list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class intrusive_list
{}

inline const iterator &
operator++(void) noexcept
operator++() noexcept
{
element_ = list_->accessor_.get_next(element_);
return *this;
Expand All @@ -131,7 +131,7 @@ class intrusive_list
}

inline const iterator &
operator--(void) noexcept
operator--() noexcept
{
if (element_)
{
Expand Down Expand Up @@ -216,7 +216,7 @@ class intrusive_list
{}

inline const const_iterator &
operator++(void) noexcept
operator++() noexcept
{
element_ = list_->accessor_.get_next(element_);
return *this;
Expand All @@ -231,7 +231,7 @@ class intrusive_list
}

inline const const_iterator &
operator--(void) noexcept
operator--() noexcept
{
if (element_)
{
Expand Down
Loading

0 comments on commit 4821290

Please sign in to comment.