Skip to content

Commit aa02a12

Browse files
committed
C++: Remove FPs from cpp/too-few-arguments
1 parent 6054855 commit aa02a12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/ql/src/Likely Bugs/Underspecified Functions/TooFewArguments.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,7 @@ predicate tooFewArguments(FunctionCall fc, Function f) {
5151
hasDefiniteNumberOfParameters(fde)
5252
|
5353
fde.getNumberOfParameters() > fc.getNumberOfArguments()
54-
)
54+
) and
55+
// Don't report on implicit function declarations, as these are likely extraction errors.
56+
not f.getADeclarationEntry().isImplicit()
5557
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
| test.c:34:3:34:19 | call to not_yet_declared2 | This call has fewer arguments than required by $@. | test.c:32:3:32:3 | not_yet_declared2 | not_yet_declared2 |
2-
| test.c:34:3:34:19 | call to not_yet_declared2 | This call has fewer arguments than required by $@. | test.c:76:6:76:22 | not_yet_declared2 | not_yet_declared2 |
31
| test.c:36:3:36:29 | call to declared_empty_defined_with | This call has fewer arguments than required by $@. | test.c:77:6:77:32 | declared_empty_defined_with | declared_empty_defined_with |
42
| test.c:87:10:87:20 | call to dereference | This call has fewer arguments than required by $@. | test.c:90:5:90:15 | dereference | dereference |

0 commit comments

Comments
 (0)