mirror of
https://github.com/Z3Prover/z3
synced 2026-05-03 00:45:15 +00:00
Replace fall-through comments with Z3_fallthrough macro (#8219)
* Initial plan * Fix switch fall-through warnings with Z3_fallthrough attribute Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
c8d6b3161f
commit
de825be4c7
5 changed files with 4 additions and 5 deletions
|
|
@ -175,7 +175,7 @@ namespace datalog {
|
||||||
switch(search(depth-1, index+1)) {
|
switch(search(depth-1, index+1)) {
|
||||||
case l_undef:
|
case l_undef:
|
||||||
status = l_undef;
|
status = l_undef;
|
||||||
// fallthrough
|
Z3_fallthrough;
|
||||||
case l_false:
|
case l_false:
|
||||||
m_goals.resize(num_goals);
|
m_goals.resize(num_goals);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1884,7 +1884,7 @@ public:
|
||||||
switch(m_mark[w]) {
|
switch(m_mark[w]) {
|
||||||
case DL_UNMARKED:
|
case DL_UNMARKED:
|
||||||
m_visited.push_back(w);
|
m_visited.push_back(w);
|
||||||
// fall through
|
Z3_fallthrough;
|
||||||
case DL_PROCESSED:
|
case DL_PROCESSED:
|
||||||
m_mark[w] = DL_FOUND;
|
m_mark[w] = DL_FOUND;
|
||||||
m_heap.insert(w);
|
m_heap.insert(w);
|
||||||
|
|
|
||||||
|
|
@ -2552,7 +2552,7 @@ namespace smt {
|
||||||
break;
|
break;
|
||||||
case l_true:
|
case l_true:
|
||||||
is_taut = true;
|
is_taut = true;
|
||||||
// fallthrough
|
Z3_fallthrough;
|
||||||
case l_undef:
|
case l_undef:
|
||||||
if (i != j) {
|
if (i != j) {
|
||||||
cls.swap_lits(i, j);
|
cls.swap_lits(i, j);
|
||||||
|
|
|
||||||
|
|
@ -1164,7 +1164,6 @@ namespace smt {
|
||||||
simp_lits.push_back(~curr);
|
simp_lits.push_back(~curr);
|
||||||
}
|
}
|
||||||
break; // ignore literal
|
break; // ignore literal
|
||||||
// fall through
|
|
||||||
case l_undef:
|
case l_undef:
|
||||||
if (curr == ~prev)
|
if (curr == ~prev)
|
||||||
return false; // clause is equivalent to true
|
return false; // clause is equivalent to true
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ namespace smt {
|
||||||
switch (is_true) {
|
switch (is_true) {
|
||||||
case l_false:
|
case l_false:
|
||||||
lit.neg();
|
lit.neg();
|
||||||
// fall-through
|
Z3_fallthrough;
|
||||||
case l_true:
|
case l_true:
|
||||||
ctx.mk_th_axiom(get_id(), 1, &lit);
|
ctx.mk_th_axiom(get_id(), 1, &lit);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue