Closed j-stephan closed 3 years ago
Check | Enable | Disable | Comment |
---|---|---|---|
Postfix operator must be const | 1 | 1 | It is always weird to return by const value. This could also prevent move optimizations. And it contradicts the Avoid const return types check. |
Misplaced const | 2 | 0 | |
Avoid const parameters | 2 | 0 | |
Avoid const return types | 2 | 0 | |
Use const pointer parameters | 2 | 0 |
Check | Enable | Disable | Comment |
---|---|---|---|
Postfix operator must be const | 1 | 2 | I agree with Bernhard, but this is also rather rare I think |
Misplaced const | 3 | 0 | |
Avoid const parameters | 3 | 0 | Note: as the linked docs say, it applies only to function declarations, not definitions (which is good) |
Avoid const return types | 3 | 0 | |
Use const pointer parameters | 3 | 0 |
Please merge this!
This PR includes the checks that deal with correct
constness
. Voting will end on 17 November 2020, 18:00 HZDR time.Included checks:
x++
/x--
) if their return type is notconst
(Documentation)const
on pointer typedefs (Documentation)const
that are neither pointers nor references (Documentation)const
if the value is neither a pointer nor a reference (Documentation)const
if possible (Documentation)Vote
const
const
const
parametersconst
return typesconst
pointer parameters