weggli
weggli copied to clipboard
Function variable position independence
When establishing rules, the position of function parameters will affect weggli's search, for example:
int bad(int limit,char *buf)
{
char buf[BUFSIZE];
for (int i = 0; i < limit; i++) {
buf[i] = "A";
}
}
Can be found by
_ $fn(_ $limit ,_*$buf) {
for (_; $i<$limit; _) {
$buf[$i]=_;
}
}
but
_ $fn(_*$buf,_ $limit ) {
for (_; $i<$limit; _) {
$buf[$i]=_;
}
}
Can not find. Does weggli provide an option to ignore the position of function parameters