Running astyle [ci skip]

This commit is contained in:
orbitcowboy 2021-07-17 08:19:04 +02:00
parent 8ee223f03d
commit 3f1e937ea1
3 changed files with 4 additions and 5 deletions

View File

@ -140,8 +140,7 @@ struct Analyzer {
virtual void update(Token* tok, Action a, Direction d) = 0;
/// Try to evaluate the value of a token(most likely a condition)
virtual std::vector<int> evaluate(Evaluate e, const Token* tok, const Token* ctx = nullptr) const = 0;
std::vector<int> evaluate(const Token* tok, const Token* ctx = nullptr) const
{
std::vector<int> evaluate(const Token* tok, const Token* ctx = nullptr) const {
return evaluate(Evaluate::Integral, tok, ctx);
}
/// Lower any values to possible

View File

@ -2177,8 +2177,7 @@ struct ValueFlowAnalyzer : Analyzer {
return Action::None;
}
virtual std::vector<int> evaluate(Evaluate e, const Token* tok, const Token* ctx = nullptr) const OVERRIDE
{
virtual std::vector<int> evaluate(Evaluate e, const Token* tok, const Token* ctx = nullptr) const OVERRIDE {
if (e == Evaluate::Integral) {
if (tok->hasKnownIntValue())
return {static_cast<int>(tok->values().front().intvalue)};

View File

@ -1381,7 +1381,8 @@ private:
check(code, "test.c", &s); // c code (c89)
ASSERT_EQUALS("[test.c:1]: (error) Found a exit path from function with non-void return type that has missing return statement\n", errout.str());
s.standards.c = Standards::C99; check(code, "test.c", &s); // c code (c99)
s.standards.c = Standards::C99;
check(code, "test.c", &s); // c code (c99)
ASSERT_EQUALS("", errout.str());
check(code, "test.cpp", &s); // c++ code