Skip to content

Commit 1322c81

Browse files
Update valueflow.cpp
1 parent 55ae8c4 commit 1322c81

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,6 +2536,8 @@ static void valueFlowLifetimeFunction(Token *tok, const TokenList &tokenlist, Er
25362536
}
25372537
if (Function::returnsReference(f))
25382538
return;
2539+
if (astIsContainerString(tok->next()) && !astIsContainerView(tok->next()))
2540+
return;
25392541
std::vector<const Token*> returns = Function::findReturns(f);
25402542
const bool inconclusive = returns.size() > 1;
25412543
bool update = false;

0 commit comments

Comments
 (0)