CheckCondition: Fix FP found in daca results (ace)
This commit is contained in:
parent
d7b91a9e92
commit
c1000998f0
|
@ -503,7 +503,7 @@ void CheckCondition::multiCondition2()
|
||||||
}
|
}
|
||||||
} else if (!nonlocal && cond->isName()) {
|
} else if (!nonlocal && cond->isName()) {
|
||||||
// varid is 0. this is possibly a nonlocal variable..
|
// varid is 0. this is possibly a nonlocal variable..
|
||||||
nonlocal = Token::Match(cond->astParent(), "%cop%|(|[");
|
nonlocal = Token::Match(cond->astParent(), "%cop%|(|[") || (_tokenizer->isCPP() && cond->str() == "this");
|
||||||
} else {
|
} else {
|
||||||
tokens.push(cond->astOperand1());
|
tokens.push(cond->astOperand1());
|
||||||
tokens.push(cond->astOperand2());
|
tokens.push(cond->astOperand2());
|
||||||
|
|
|
@ -1513,6 +1513,15 @@ private:
|
||||||
" }\n"
|
" }\n"
|
||||||
"}");
|
"}");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
check("void Fred::f() {\n" // daca: ace
|
||||||
|
" if (this->next_ == map_man_->table_) {\n"
|
||||||
|
" this->next_ = n;\n"
|
||||||
|
" if (this->next_ != map_man_->table_) {}\n"
|
||||||
|
" }\n"
|
||||||
|
"}");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void oppositeInnerConditionClass() {
|
void oppositeInnerConditionClass() {
|
||||||
|
|
Loading…
Reference in New Issue