Remove FwdAnalysis::reads: It is not finished

This commit is contained in:
Daniel Marjamäki 2018-12-04 18:46:23 +01:00
parent f5a94ed300
commit 452318dfa4
2 changed files with 1 additions and 18 deletions

View File

@ -1178,11 +1178,3 @@ const Token *FwdAnalysis::reassign(const Token *expr, const Token *startToken, c
Result result = check(expr, startToken, endToken);
return result.type == FwdAnalysis::Result::Type::WRITE ? result.token : nullptr;
}
std::vector<const Token *> FwdAnalysis::reads(const Token *expr, const Token *startToken, const Token *endToken)
{
mReassign = false;
mReads.clear();
check(expr, startToken, endToken);
return mReads;
}

View File

@ -175,20 +175,11 @@ public:
*/
const Token *reassign(const Token *expr, const Token *startToken, const Token *endToken);
/**
* Get tokens where "expr" is read. The "expr" can be a tree (x.y[12]).
* @param expr Symbolic expression to perform forward analysis for
* @param startToken First token in forward analysis
* @param endToken Last token in forward analysis
* @return vector of read tokens
*/
std::vector<const Token *> reads(const Token *expr, const Token *startToken, const Token *endToken);
private:
/** Result of forward analysis */
struct Result {
enum class Type { NONE, READ, WRITE, BREAK, RETURN, BAILOUT } type;
Result(Type type) : type(type), token(nullptr) {}
explicit Result(Type type) : type(type), token(nullptr) {}
Result(Type type, const Token *token) : type(type), token(token) {}
const Token *token;
};