@@ -518,7 +518,7 @@ void CheckAutoVariables::checkVarLifetimeScope(const Token * start, const Token
518518 for (const Token *tok = start; tok && tok != end; tok = tok->next ()) {
519519 // Return reference from function
520520 if (returnRef && Token::simpleMatch (tok->astParent (), " return" )) {
521- for (const LifetimeToken& lt : getLifetimeTokens (tok, true )) {
521+ for (const ValueFlow:: LifetimeToken& lt : ValueFlow:: getLifetimeTokens (tok, true )) {
522522 if (!printInconclusive && lt.inconclusive )
523523 continue ;
524524 const Variable* var = lt.token ->variable ();
@@ -537,14 +537,14 @@ void CheckAutoVariables::checkVarLifetimeScope(const Token * start, const Token
537537 tok->variable ()->declarationId () == tok->varId () && tok->variable ()->isStatic () &&
538538 !tok->variable ()->isArgument ()) {
539539 ErrorPath errorPath;
540- const Variable *var = getLifetimeVariable (tok, errorPath);
540+ const Variable *var = ValueFlow:: getLifetimeVariable (tok, errorPath);
541541 if (var && isInScope (var->nameToken (), tok->scope ())) {
542542 errorDanglingReference (tok, var, errorPath);
543543 continue ;
544544 }
545545 // Reference to temporary
546546 } else if (tok->variable () && (tok->variable ()->isReference () || tok->variable ()->isRValueReference ())) {
547- for (const LifetimeToken& lt : getLifetimeTokens (getParentLifetime (tok))) {
547+ for (const ValueFlow:: LifetimeToken& lt : ValueFlow:: getLifetimeTokens (getParentLifetime (tok))) {
548548 if (!printInconclusive && lt.inconclusive )
549549 continue ;
550550 const Token * tokvalue = lt.token ;
@@ -565,13 +565,13 @@ void CheckAutoVariables::checkVarLifetimeScope(const Token * start, const Token
565565 const Token* parent = getParentLifetime (mTokenizer ->isCPP (), val.tokvalue , &mSettings ->library );
566566 if (!exprs.insert (parent).second )
567567 continue ;
568- for (const LifetimeToken& lt : getLifetimeTokens (parent, escape || isAssignedToNonLocal (tok))) {
568+ for (const ValueFlow:: LifetimeToken& lt : ValueFlow:: getLifetimeTokens (parent, escape || isAssignedToNonLocal (tok))) {
569569 const Token * tokvalue = lt.token ;
570570 if (val.isLocalLifetimeValue ()) {
571571 if (escape) {
572572 if (getPointerDepth (tok) < getPointerDepth (tokvalue))
573573 continue ;
574- if (!isLifetimeBorrowed (tok, mSettings ))
574+ if (!ValueFlow:: isLifetimeBorrowed (tok, mSettings ))
575575 continue ;
576576 if (tokvalue->exprId () == tok->exprId () && !(tok->variable () && tok->variable ()->isArray ()) &&
577577 !astIsContainerView (tok->astParent ()))
@@ -604,7 +604,7 @@ void CheckAutoVariables::checkVarLifetimeScope(const Token * start, const Token
604604 } else if (tok->variable () && tok->variable ()->declarationId () == tok->varId ()) {
605605 var = tok->variable ();
606606 }
607- if (!isLifetimeBorrowed (tok, mSettings ))
607+ if (!ValueFlow:: isLifetimeBorrowed (tok, mSettings ))
608608 continue ;
609609 const Token* nextTok = nextAfterAstRightmostLeaf (tok->astTop ());
610610 if (!nextTok)
0 commit comments