File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1489,7 +1489,12 @@ struct ContainerExpressionAnalyzer : ExpressionAnalyzer {
14891489 const Library::Container::Action action = container->getAction (tok->astParent ()->strAt (1 ));
14901490 if (action == Library::Container::Action::PUSH || action == Library::Container::Action::POP || action == Library::Container::Action::APPEND) { // TODO: handle more actions?
14911491 std::vector<const Token*> args = getArguments (tok->tokAt (3 ));
1492- if (args.size () < 2 || action == Library::Container::Action::APPEND)
1492+ bool isVariadic = false ;
1493+ if (const Library::Function* libFunc = settings.library .getFunction (tok->tokAt (2 )); {
1494+ const auto & argChecks = libFunc->argumentChecks ;
1495+ isVariadic = argChecks.find (-1 ) != argChecks.end () && argChecks.at (-1 ).variadic ;
1496+ }
1497+ if (args.size () < 2 || action == Library::Container::Action::APPEND || isVariadic)
14931498 return Action::Read | Action::Write | Action::Incremental;
14941499 }
14951500 }
You can’t perform that action at this time.
0 commit comments