[CPP-340] Create QL query for function call argument count mismatches.

Update QHELP file, test and test results.
This commit is contained in:
Ziemowit Laski
2019-03-18 16:10:35 -07:00
parent 241994d1f8
commit 0c350dc504
4 changed files with 32 additions and 19 deletions

View File

@@ -1,3 +1,4 @@
| test.c:8:3:8:16 | call to declared_empty | This call has arguments, but $@ is not declared with any parameters. | test.c:1:6:1:19 | declared_empty | declared_empty |
| test.c:14:3:14:19 | call to not_yet_declared1 | This call has arguments, but $@ is not declared with any parameters. | test.c:14:3:14:3 | not_yet_declared1 | not_yet_declared1 |
| test.c:14:3:14:19 | call to not_yet_declared1 | This call has arguments, but $@ is not declared with any parameters. | test.c:25:6:25:22 | not_yet_declared1 | not_yet_declared1 |
| test.c:7:3:7:16 | call to declared_empty |
| test.c:16:3:16:19 | call to not_yet_declared1 |
| test.c:19:3:19:29 | call to declared_empty_defined_with |
| test.c:24:3:24:29 | call to declared_empty_defined_with |

View File

@@ -1,7 +1,6 @@
void declared_empty();
void declared_void(void);
void declared_with(int);
void declared_empty_defined_with();
void test() {
declared_empty(); // GOOD
@@ -9,17 +8,20 @@ void test() {
declared_void(); // GOOD
declared_with(1); // GOOD
declared_ellipsis(); // GOOD
declared_ellipsis(2); // GOOD
undeclared(1); // GOOD
not_yet_declared1(1); // BAD
not_yet_declared2(1); // GOOD
declared_empty_defined_with(); // BAD [NOT DETECTED]
declared_empty_defined_with(); // BAD
declared_empty_defined_with(1); // GOOD
int x;
declared_empty_defined_with(&x); // BAD [NOT DETECTED]
declared_empty_defined_with(x, x); // BAD [NOT DETECTED]
declared_empty_defined_with(&x); // GOOD
declared_empty_defined_with(x, x); // BAD
}
void not_yet_declared1();