Predicate signatureMatches
Holds if the suffix containing the entries in signature starting at entry
i matches the suffix containing the parameters of func starting at entry i.
For example, consider the signature (int,bool,char) and a function:
void f(int a, bool b, char c);
- The predicate holds for
i = 2because the suffix containing all the entries insignaturestarting at2ischar, and suffix containing all the parameters offuncstarting at2ischar. - The predicate holds for
i = 1because the suffix containing all the entries insignaturestarting at1isbool,char, and the suffix containing all the parameters offuncstarting at1isbool, char. - The predicate holds for
i = 0because the suffix containing all the entries insignaturestarting at0isint,bool,charand the suffix containing all the parameters offuncstarting at0isint, bool, char.
When paramsString(func)[i] is class:n then the signature name is
compared with the n’th name in type, and when paramsString(func)[i]
is func:n then the signature name is compared with the n’th name
in name.
Import path
import semmle.code.cpp.dataflow.ExternalFlow