weggli icon indicating copy to clipboard operation
weggli copied to clipboard

Function variable position independence

Open backahasten opened this issue 2 years ago • 0 comments

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

backahasten avatar Mar 16 '23 02:03 backahasten