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

Constificator: false positive on array parameter #36

Open
PeterSommerlad opened this issue Oct 21, 2019 · 1 comment
Open

Constificator: false positive on array parameter #36

PeterSommerlad opened this issue Oct 21, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@PeterSommerlad
Copy link

Expected Behavior

for the following code, no const should be suggested for the array element type:

void takeintarray(int a[], size_t const len) {
	for(size_t i=0; i <len;++i)
		a[i] = a[i] < 0? -a[i]:a[i];
}

Actual Behavior

suggest and changes a to int const a[]

Cevelop Version, Operating System and Compiler

Cevelop C++ IDE

Version: 1.13.0-201910070714

Constificator 1.13.0.201910091317 com.cevelop.constificator.feature.feature.group IFS Institute for Software

@PeterSommerlad
Copy link
Author

similar case for local array passed as pointer to non-const type to a function:
Screenshot 2020-04-28 at 10 30 30

@fmorgner fmorgner transferred this issue from Cevelop/Issues Feb 23, 2021
@fmorgner fmorgner changed the title constificator false positive on array parameter Constificator: false positive on array parameter Feb 23, 2021
@fmorgner fmorgner added the bug Something isn't working label Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants