| 1721 | } |
| 1722 | |
| 1723 | Library::ArgumentChecks::Direction Library::getArgDirection(const Token* ftok, int argnr, int indirect) const |
| 1724 | { |
| 1725 | const ArgumentChecks* arg = getarg(ftok, argnr); |
| 1726 | if (arg) { |
| 1727 | if (indirect < 0 || indirect >= arg->direction.size()) |
| 1728 | return ArgumentChecks::Direction::DIR_UNKNOWN; // TODO: don't generate bad indirect values |
| 1729 | return arg->direction[indirect]; |
| 1730 | } |
| 1731 | if (formatstr_function(ftok)) { |
| 1732 | const int fs_argno = formatstr_argno(ftok); |
| 1733 | if (fs_argno >= 0 && argnr >= fs_argno) { |
| 1734 | if (formatstr_scan(ftok)) |
| 1735 | return ArgumentChecks::Direction::DIR_OUT; |
| 1736 | return ArgumentChecks::Direction::DIR_IN; |
| 1737 | } |
| 1738 | } |
| 1739 | return ArgumentChecks::Direction::DIR_UNKNOWN; |
| 1740 | } |
| 1741 | |
| 1742 | bool Library::ignorefunction(const std::string& functionName) const |
| 1743 | { |