Skip to content

Commit 78191ee

Browse files
author
Lukasz A.J. Wrona
committed
Remove NOLINTs for lambdas.
1 parent 692c4f3 commit 78191ee

File tree

18 files changed

+64
-98
lines changed

18 files changed

+64
-98
lines changed

src/goto-programs/goto_convert.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,10 +1823,8 @@ void goto_convertt::generate_ifthenelse(
18231823
// Note this depends on the fact that `instructions` is a std::list
18241824
// and so goto-program-destructive-append preserves iterator validity.
18251825
if(is_guarded_goto)
1826-
guarded_gotos.push_back({ // NOLINT(whitespace/braces)
1827-
tmp_v.instructions.begin(),
1828-
tmp_w.instructions.begin(),
1829-
guard});
1826+
guarded_gotos.push_back(
1827+
{tmp_v.instructions.begin(), tmp_w.instructions.begin(), guard});
18301828

18311829
dest.destructive_append(tmp_v);
18321830
dest.destructive_append(tmp_w);

src/goto-programs/lazy_goto_model.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ class lazy_goto_modelt : public abstract_goto_modelt
5353
message_handlert &message_handler)
5454
{
5555
return lazy_goto_modelt(
56-
[&handler, &options]
57-
(goto_model_functiont &fun, const abstract_goto_modelt &model) { // NOLINT(*)
56+
[&handler,
57+
&options](goto_model_functiont &fun, const abstract_goto_modelt &model) {
5858
handler.process_goto_function(fun, model, options);
5959
},
60-
[&handler, &options] (goto_modelt &goto_model) -> bool { // NOLINT(*)
60+
[&handler, &options](goto_modelt &goto_model) -> bool {
6161
return handler.process_goto_functions(goto_model, options);
6262
},
6363
message_handler);

src/goto-symex/symex_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ void goto_symext::symex_threaded_step(
166166
static goto_symext::get_goto_functiont get_function_from_goto_functions(
167167
const goto_functionst &goto_functions)
168168
{
169-
return [&goto_functions](const irep_idt &key) ->
170-
const goto_functionst::goto_functiont & { // NOLINT(*)
169+
return [&goto_functions](
170+
const irep_idt &key) -> const goto_functionst::goto_functiont & {
171171
return goto_functions.function_map.at(key);
172172
};
173173
}

src/java_bytecode/expr2java.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ std::string floating_point_to_java_string(float_type value)
6666
return class_name + ".POSITIVE_INFINITY";
6767
if(std::isinf(value) && value <= 0.)
6868
return class_name + ".NEGATIVE_INFINITY";
69-
const std::string decimal = [&]() -> std::string { // NOLINT
69+
const std::string decimal = [&]() -> std::string {
7070
// Using ostringstream instead of to_string to get string without
7171
// trailing zeros
7272
std::ostringstream raw_stream;
@@ -76,7 +76,7 @@ std::string floating_point_to_java_string(float_type value)
7676
return raw_decimal + ".0";
7777
return raw_decimal;
7878
}();
79-
const bool is_lossless = [&] { // NOLINT
79+
const bool is_lossless = [&] {
8080
if(value == std::numeric_limits<float_type>::min())
8181
return true;
8282
try
@@ -88,7 +88,7 @@ std::string floating_point_to_java_string(float_type value)
8888
return false;
8989
}
9090
}();
91-
const std::string lossless = [&]() -> std::string { // NOLINT
91+
const std::string lossless = [&]() -> std::string {
9292
if(is_lossless)
9393
return decimal;
9494
std::ostringstream stream;

src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,8 @@ static void gather_symbol_live_ranges(
895895
if(e.id()==ID_symbol)
896896
{
897897
const auto &symexpr=to_symbol_expr(e);
898-
auto findit=
899-
result.insert({ // NOLINT(whitespace/braces)
900-
symexpr.get_identifier(),
901-
java_bytecode_convert_methodt::variablet()});
898+
auto findit = result.insert(
899+
{symexpr.get_identifier(), java_bytecode_convert_methodt::variablet()});
902900
auto &var=findit.first->second;
903901
if(findit.second)
904902
{

src/java_bytecode/java_bytecode_instrument.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class java_bytecode_instrumentt:public messaget
7575
optionalt<codet> instrument_expr(const exprt &expr);
7676
};
7777

78-
const std::vector<std::string> exception_needed_classes = { // NOLINT
78+
const std::vector<std::string> exception_needed_classes = {
7979
"java.lang.ArithmeticException",
8080
"java.lang.ArrayIndexOutOfBoundsException",
8181
"java.lang.ClassCastException",

src/java_bytecode/java_bytecode_language.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ bool java_bytecode_languaget::parse(
157157
{
158158
string_preprocess.initialize_known_type_table();
159159

160-
auto get_string_base_classes = [this](const irep_idt &id) { // NOLINT (*)
160+
auto get_string_base_classes = [this](const irep_idt &id) {
161161
return string_preprocess.get_string_type_base_classes(id);
162162
};
163163

src/java_bytecode/remove_exceptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ void remove_exceptions(
572572
std::map<irep_idt, std::set<irep_idt>> exceptions_map;
573573
uncaught_exceptions(goto_functions, ns, exceptions_map);
574574
remove_exceptionst::function_may_throwt function_may_throw =
575-
[&exceptions_map](const irep_idt &id) { // NOLINT(whitespace/braces)
575+
[&exceptions_map](const irep_idt &id) {
576576
return !exceptions_map[id].empty();
577577
};
578578
remove_exceptionst remove_exceptions(

src/java_bytecode/remove_instanceof.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ std::size_t remove_instanceoft::lower_instanceof(
9090
// Sort alphabetically to make order of generated disjuncts
9191
// independent of class loading order
9292
std::sort(
93-
children.begin(),
94-
children.end(),
95-
[](const irep_idt &a, const irep_idt &b) { // NOLINT
93+
children.begin(), children.end(), [](const irep_idt &a, const irep_idt &b) {
9694
return a.compare(b) < 0;
9795
});
9896

src/java_bytecode/replace_java_nondet.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ static goto_programt::targett check_and_replace_target(
249249
"goto_program missing END_FUNCTION instruction");
250250

251251
std::for_each(
252-
target,
253-
after_matching_assignment,
254-
[](goto_programt::instructiont &instr) { // NOLINT (*)
252+
target, after_matching_assignment, [](goto_programt::instructiont &instr) {
255253
instr.make_skip();
256254
});
257255

0 commit comments

Comments
 (0)