Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function variable position independence #79

Open
backahasten opened this issue Mar 16, 2023 · 0 comments
Open

Function variable position independence #79

backahasten opened this issue Mar 16, 2023 · 0 comments

Comments

@backahasten
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant