File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2869,7 +2869,7 @@ static void valueFlowLifetimeClassConstructor(Token* tok,
28692869 args,
28702870 " Passed to constructor of '" + t->name () + " '." ,
28712871 ValueFlow::Value::LifetimeKind::SubObject,
2872- [&](LifetimeStore & ls) {
2872+ [&](LifetimeStore& ls) {
28732873 // Skip static variable
28742874 it = std::find_if (it, scope->varlist .cend (), [&](const Variable &var) {
28752875 return !var.isStatic () && (!hasDesignatedInitializers || var.name () == ls.argtok ->astOperand1 ()->astOperand1 ()->str ());
@@ -2883,8 +2883,7 @@ static void valueFlowLifetimeClassConstructor(Token* tok,
28832883 return ; // TODO: check in isLifetimeBorrowed()?
28842884 if (var.isReference () || var.isRValueReference ()) {
28852885 ls.byRef (tok, tokenlist, errorLogger, settings);
2886- }
2887- else if (ValueFlow::isLifetimeBorrowed (ls.argtok , settings)) {
2886+ } else if (ValueFlow::isLifetimeBorrowed (ls.argtok , settings)) {
28882887 ls.byVal (tok, tokenlist, errorLogger, settings);
28892888 }
28902889 if (hasDesignatedInitializers)
You can’t perform that action at this time.
0 commit comments