parent
5a52fa80fb
commit
903eccb336
|
@ -1857,7 +1857,7 @@ static void valueFlowImpossibleValues(TokenList& tokenList, const Settings* sett
|
|||
std::vector<ValueFlow::Value> values;
|
||||
for (const Token* tok2 : tokens) {
|
||||
if (tok2->hasKnownIntValue()) {
|
||||
values.emplace_back();
|
||||
values.emplace_back(tok2->values().front());
|
||||
} else {
|
||||
ValueFlow::Value symValue{};
|
||||
symValue.valueType = ValueFlow::Value::ValueType::SYMBOLIC;
|
||||
|
|
|
@ -4940,6 +4940,11 @@ private:
|
|||
" if (j >= 0) {}\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("void f(int i) {\n" // #12039
|
||||
" if ((128 + i < 255 ? 128 + i : 255) > 0) {}\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void alwaysTrueContainer() {
|
||||
|
|
Loading…
Reference in New Issue