astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2019-08-30 18:34:14 +02:00
parent 0b9e823fc8
commit 1a25d3f9ec
1 changed files with 13 additions and 7 deletions

View File

@ -2226,7 +2226,9 @@ static bool valueFlowForward(Token * const startToken,
setTokenValue(tokChanged, v, settings); setTokenValue(tokChanged, v, settings);
} }
} }
values.remove_if([&](const ValueFlow::Value& v) { return v.indirect == i; }); values.remove_if([&](const ValueFlow::Value& v) {
return v.indirect == i;
});
} }
} }
if (values.empty()) { if (values.empty()) {
@ -2751,7 +2753,9 @@ static bool valueFlowForward(Token * const startToken,
for (int i:getIndirections(values)) { for (int i:getIndirections(values)) {
bool inconclusive = false; bool inconclusive = false;
if (isVariableChangedByFunctionCall(tok2, i, settings, &inconclusive)) { if (isVariableChangedByFunctionCall(tok2, i, settings, &inconclusive)) {
values.remove_if([&](const ValueFlow::Value& v) { return v.indirect <= i; }); values.remove_if([&](const ValueFlow::Value& v) {
return v.indirect <= i;
});
} }
if (inconclusive) { if (inconclusive) {
for (ValueFlow::Value &v : values) { for (ValueFlow::Value &v : values) {
@ -2780,7 +2784,9 @@ static bool valueFlowForward(Token * const startToken,
for (int i:getIndirections(values)) { for (int i:getIndirections(values)) {
// Remove unintialized values if modified // Remove unintialized values if modified
if (isVariableChanged(tok2, i, settings, tokenlist->isCPP())) if (isVariableChanged(tok2, i, settings, tokenlist->isCPP()))
values.remove_if([&](const ValueFlow::Value& v) { return v.isUninitValue() && v.indirect <= i; }); values.remove_if([&](const ValueFlow::Value& v) {
return v.isUninitValue() && v.indirect <= i;
});
} }
} else if (isAliasOf(var, tok2, varid, values) && isVariableChanged(tok2, 0, settings, tokenlist->isCPP())) { } else if (isAliasOf(var, tok2, varid, values) && isVariableChanged(tok2, 0, settings, tokenlist->isCPP())) {
if (settings->debugwarnings) if (settings->debugwarnings)