Skip to content

Commit 1c1994c

Browse files
committed
valueflow.cpp: reduced variable scope in LifeTimeStore::byRef()
1 parent 1b90e6a commit 1c1994c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,12 @@ struct LifetimeStore {
13131313
for (const ValueFlow::LifetimeToken& lt : ValueFlow::getLifetimeTokens(argtok, settings)) {
13141314
if (!settings.certainty.isEnabled(Certainty::inconclusive) && lt.inconclusive)
13151315
continue;
1316-
ErrorPath er = errorPath;
1317-
er.insert(er.end(), lt.errorPath.cbegin(), lt.errorPath.cend());
13181316
if (!lt.token)
13191317
return false;
13201318
if (!pred(lt.token))
13211319
return false;
1320+
ErrorPath er = errorPath;
1321+
er.insert(er.end(), lt.errorPath.cbegin(), lt.errorPath.cend());
13221322
er.emplace_back(argtok, message);
13231323

13241324
ValueFlow::Value value;

0 commit comments

Comments
 (0)