Fix doxygen warning and astyle formatting
This commit is contained in:
parent
6d27ca6c9a
commit
270f59e76a
|
@ -96,16 +96,15 @@ static bool bailoutFunctionPar(const Token *tok, const ValueFlow::Value &value,
|
||||||
/**
|
/**
|
||||||
* Is condition always false when variable has given value?
|
* Is condition always false when variable has given value?
|
||||||
* \param condition top ast token in condition
|
* \param condition top ast token in condition
|
||||||
* \param varid variable id for variable
|
* \param programMemory program memory
|
||||||
* \param value value of variable
|
|
||||||
*/
|
*/
|
||||||
static bool conditionIsFalse(const Token *condition, const std::map<unsigned int, MathLib::bigint> &programMemory)
|
static bool conditionIsFalse(const Token *condition, const std::map<unsigned int, MathLib::bigint> &programMemory)
|
||||||
{
|
{
|
||||||
if (!condition)
|
if (!condition)
|
||||||
return false;
|
return false;
|
||||||
if (condition->str() == "&&") {
|
if (condition->str() == "&&") {
|
||||||
bool result1 = conditionIsFalse(condition->astOperand1(), programMemory);
|
const bool result1 = conditionIsFalse(condition->astOperand1(), programMemory);
|
||||||
bool result2 = result1 ? true : conditionIsFalse(condition->astOperand2(), programMemory);
|
const bool result2 = result1 ? true : conditionIsFalse(condition->astOperand2(), programMemory);
|
||||||
return result2;
|
return result2;
|
||||||
}
|
}
|
||||||
std::map<unsigned int, MathLib::bigint> progmem(programMemory);
|
std::map<unsigned int, MathLib::bigint> progmem(programMemory);
|
||||||
|
@ -118,8 +117,7 @@ static bool conditionIsFalse(const Token *condition, const std::map<unsigned int
|
||||||
/**
|
/**
|
||||||
* Is condition always true when variable has given value?
|
* Is condition always true when variable has given value?
|
||||||
* \param condition top ast token in condition
|
* \param condition top ast token in condition
|
||||||
* \param varid variable id for variable
|
* \param programMemory program memory
|
||||||
* \param value value of variable
|
|
||||||
*/
|
*/
|
||||||
static bool conditionIsTrue(const Token *condition, const std::map<unsigned int, MathLib::bigint> &programMemory)
|
static bool conditionIsTrue(const Token *condition, const std::map<unsigned int, MathLib::bigint> &programMemory)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1267,9 +1267,9 @@ private:
|
||||||
// #6106
|
// #6106
|
||||||
code = " f { int i ; b2 , [ ] ( for ( i = 0 ; ; ) ) }";
|
code = " f { int i ; b2 , [ ] ( for ( i = 0 ; ; ) ) }";
|
||||||
valueOfTok(code, "*");
|
valueOfTok(code, "*");
|
||||||
|
|
||||||
// 6122 survive garbage code
|
// 6122 survive garbage code
|
||||||
code = "; { int i ; for ( i = 0 ; = 123 ; ) - ; }";
|
code = "; { int i ; for ( i = 0 ; = 123 ; ) - ; }";
|
||||||
valueOfTok(code, "*");
|
valueOfTok(code, "*");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue