Refine QL query by requiring that a ()-declaration be present.

This commit is contained in:
Ziemowit Laski
2019-03-18 17:23:03 -07:00
parent 0c350dc504
commit 5d8b84c22a

View File

@@ -14,6 +14,8 @@ import cpp
from FunctionCall fc, Function f
where f = fc.getTarget() and not f.isVarargs()
/* There must be a zero-parameter declaration */
and exists ( FunctionDeclarationEntry fde | fde = f.getADeclarationEntry() | fde.getNumberOfParameters() = 0)
/* There must be a mismatch between number of call arguments and number of parameters in some
* non-implicit declaration of Function f
*/