3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-25 08:22:35 +00:00

Remove unnecessary semicolons (Attempt 2) (#10020)

This is another PR towards the goal of getting Z3 to compile cleanly
when included via FetchContents into clang-tidy, which uses a pretty
strict set of warnings.

This is a second version of https://github.com/Z3Prover/z3/pull/9957. I
address @NikolajBjorner 's comments about not changing the semicolons
after macro invocations, because some editors work better with them
present. It now, to the best of my ability, only deletes semis:

* after the closing brace of namespace decl.
* after the closing brace of an extern "C" decl.
* after a function definition.

This PR is very large, but it consists entirely of deletions of
semicolons in these situations.

(If there was a way to update the previous PR, which had been closed,
and that is preferable, please let me know. I couldn't figure it out.)
This commit is contained in:
davedets 2026-07-02 12:47:29 -07:00 committed by GitHub
parent 69444de05b
commit 6ac3075022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
429 changed files with 477 additions and 476 deletions

View file

@ -97,5 +97,5 @@ namespace nlsat {
bool contains(var x) const override { return x != m_y && m_assignment.is_assigned(x); }
anum const & operator()(var x) const override { return m_assignment.value(x); }
};
};
}

View file

@ -49,4 +49,4 @@ namespace nlsat {
return false;
}
};
}

View file

@ -66,5 +66,5 @@ namespace nlsat {
typedef ptr_vector<clause> clause_vector;
};
}

View file

@ -699,4 +699,4 @@ namespace nlsat {
void evaluator::pop(unsigned num_scopes) {
// do nothing
}
};
}

View file

@ -57,5 +57,5 @@ namespace nlsat {
void pop(unsigned num_scopes);
};
};
}

View file

@ -1784,7 +1784,7 @@ namespace nlsat {
m_imp->test_root_literal(k, y, i, p, result);
}
};
}
#ifdef Z3DEBUG
#include <iostream>
void pp(nlsat::explain::imp & ex, unsigned num, nlsat::literal const * ls) {

View file

@ -108,4 +108,4 @@ namespace nlsat {
void test_root_literal(atom::kind k, var y, unsigned i, poly* p, scoped_literal_vector & result);
};
};
}

View file

@ -794,4 +794,4 @@ namespace nlsat {
out << "*";
return out;
}
};
}

View file

@ -118,5 +118,5 @@ namespace nlsat {
return out;
}
};
}

View file

@ -106,5 +106,5 @@ namespace nlsat {
a.deallocate(obj_sz, ptr);
}
}
};
}

View file

@ -107,5 +107,5 @@ namespace nlsat {
operator literal const &() const { return m_lit; }
void neg() { m_lit.neg(); }
};
};
}

View file

@ -826,4 +826,4 @@ namespace nlsat {
(*m_imp)();
}
};
}

View file

@ -4784,4 +4784,4 @@ namespace nlsat {
unsigned solver::lws_spt_threshold() const { return m_imp->m_lws_spt_threshold; }
bool solver::lws_witness_subs_lc() const { return m_imp->m_lws_witness_subs_lc; }
bool solver::lws_witness_subs_disc() const { return m_imp->m_lws_witness_subs_disc; }
};
}

View file

@ -316,4 +316,4 @@ namespace nlsat {
};
};
}

View file

@ -67,4 +67,4 @@ namespace nlsat {
return a1->m_kind == a2->m_kind && a1->m_x == a2->m_x && a1->m_i == a2->m_i && a1->m_p == a2->m_p;
}
};
}

View file

@ -26,7 +26,7 @@ Revision History:
namespace algebraic_numbers {
class anum;
class manager;
};
}
namespace nlsat {
#define NLSAT_VB_LVL 10
@ -204,5 +204,5 @@ namespace nlsat {
if (s == 0) return 0;
return 1;
}
};
}