Skip to content

Commit

Permalink
infer.cpp: made some members private [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Feb 6, 2025
1 parent 933dbd9 commit 9e1a7a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/infer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ std::vector<MathLib::bigint> getMaxValue(const ValuePtr<InferModel>& model, cons

namespace {
struct IntegralInferModel : InferModel {
private:
bool match(const ValueFlow::Value& value) const override {
return value.isIntValue();
}
Expand All @@ -410,10 +411,10 @@ ValuePtr<InferModel> makeIntegralInferModel()

namespace {
struct SymbolicInferModel : InferModel {
const Token* expr;
explicit SymbolicInferModel(const Token* tok) : expr(tok) {
assert(expr->exprId() != 0);
}
private:
bool match(const ValueFlow::Value& value) const override
{
return value.isSymbolicValue() && value.tokvalue && value.tokvalue->exprId() == expr->exprId();
Expand All @@ -426,6 +427,7 @@ namespace {
result.setKnown();
return result;
}
const Token* expr;
};
}

Expand All @@ -436,6 +438,7 @@ ValuePtr<InferModel> makeSymbolicInferModel(const Token* token)

namespace {
struct IteratorInferModel : InferModel {
private:
virtual ValueFlow::Value::ValueType getType() const = 0;
bool match(const ValueFlow::Value& value) const override {
return value.valueType == getType();
Expand All @@ -450,12 +453,14 @@ namespace {
};

struct EndIteratorInferModel : IteratorInferModel {
private:
ValueFlow::Value::ValueType getType() const override {
return ValueFlow::Value::ValueType::ITERATOR_END;
}
};

struct StartIteratorInferModel : IteratorInferModel {
private:
ValueFlow::Value::ValueType getType() const override {
return ValueFlow::Value::ValueType::ITERATOR_END;
}
Expand Down

0 comments on commit 9e1a7a7

Please sign in to comment.