3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-20 23:50:25 +00:00

Use "override" keyword where needed. (#9892)

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.

The PR adds
```
  "-Wsuggest-override"
  "-Winconsistent-missing-override"
 ```
 to the CLANG_ONLY_WARNINGS.  This exposes a relatively small number of places where method overrides did not use the "override" keyword.  The PR fixes those.
 
(In cmd_util.h, I also made the *_CMD macros be uniform in not ending the class they define with a semicolon; the invocation of the macro can add the semicolon.)
This commit is contained in:
davedets 2026-06-18 12:36:14 -07:00 committed by Nikolaj Bjorner
parent cf9e39f775
commit 72973b00eb
5 changed files with 59 additions and 38 deletions

View file

@ -580,7 +580,7 @@ namespace lp {
const lar_term* m_t;
undo_add_term(imp& s, const lar_term* t) : m_s(s), m_t(t) {}
void undo() {
void undo() override {
m_s.undo_add_term_method(m_t);
}
};