Skip to content

Commit

Permalink
Fix clang-tidy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinH committed Sep 22, 2023
1 parent 1c6a319 commit d09bb1c
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

# Enable google-readability-casting again when it doesn't give false positives for C-style casts.

Checks: >-
bugprone-*,
-bugprone-easily-swappable-parameters,
Expand All @@ -14,7 +16,7 @@ Checks: >-
google-build-namespaces,
google-default-arguments,
google-global-names-in-headers,
google-readability-casting,
-google-readability-casting,
llvm-*,
-llvm-namespace-comment,
misc-*,
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/abnf2pegtl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << '\n';
<< std::setw( int( p.column ) ) << '^' << '\n';
}
#else
if( const auto root = parse_tree::parse< abnf::grammar::rulelist, abnf::selector, nothing, abnf::control >( in ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ int main( int argc, char** argv )
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << '\n';
<< std::setw( int( p.column ) ) << '^' << '\n';
}
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/json_ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << std::endl
<< in.line_at( p ) << std::endl
<< std::setw( p.column ) << '^' << std::endl;
<< std::setw( int( p.column ) ) << '^' << std::endl;
return 1;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/json_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << std::endl;
<< std::setw( int( p.column ) ) << '^' << std::endl;
return 1;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/json_coverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << std::endl;
<< std::setw( int( p.column ) ) << '^' << std::endl;
return 1;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/json_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << std::endl;
<< std::setw( int( p.column ) ) << '^' << std::endl;
return 1;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/json_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << std::endl;
<< std::setw( int( p.column ) ) << '^' << std::endl;
return 1;
}
#else
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/proto3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << '\n';
<< std::setw( int( p.column ) ) << '^' << '\n';
}
}
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/example/pegtl/s_expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int main( int argc, char** argv ) // NOLINT(bugprone-exception-escape)
const auto& p = e.position_object();
std::cerr << e.what() << '\n'
<< in.line_at( p ) << '\n'
<< std::setw( p.column ) << '^' << '\n';
<< std::setw( int( p.column ) ) << '^' << '\n';
}
}
return 0;
Expand Down

0 comments on commit d09bb1c

Please sign in to comment.