I would expect to constificator to not recommend making undeclared arguments const. consider the following example:
int f(int); // declaration in header file
int f(int) {} // definition in cpp file
The parameter to f is not used by in the function body, and so the argument is not declared. Whether it's const or not is not relevant, because there's no name associated with it. I would not expect constificator to recommend adding const to the function definition in the above example.
Actual Behavior
Constificator flags the above example as missing const.
My specific case where this happens is an assert function in release build:
Expected Behavior
I would expect to constificator to not recommend making undeclared arguments const. consider the following example:
int f(int); // declaration in header file
int f(int) {} // definition in cpp file
The parameter to f is not used by in the function body, and so the argument is not declared. Whether it's const or not is not relevant, because there's no name associated with it. I would not expect constificator to recommend adding const to the function definition in the above example.
Actual Behavior
Constificator flags the above example as missing const.
My specific case where this happens is an
assert
function in release build:Every argument to this function is flagged as needing a top-level const.
Cevelop Version, Operating System and Compiler
MacOS X, Version: 1.6.0-201701201507