- Flag non-const variables that are not modified (except for parameters to avoid many false positives)
partial enforcement
clang-tidy: readability-non-const-parameter
TODO: Implement same check for local variables
- Flag a member function that is not marked const, but that does not perform a non-const operation on any member variable.
no enforcement
- Flag function that does not modify an object passed by pointer or reference to non-const
- Flag a function that (using a cast) modifies an object passed by pointer or reference to const
core-check: C26460 USE_CONST_REFERENCE_ARGUMENTS, C26461 USE_CONST_POINTER_ARGUMENTS
- Flag unmodified non-const variables duplication to Con.1
core-check: C26462 USE_CONST_POINTER_FOR_VARIABLE, C26463 USE_CONST_FOR_ELEMENTS, C26464 USE_CONST_POINTER_FOR_ELEMENTS, C26496 USE_CONST_FOR_VARIABLE, C26498 USE_CONSTEXPR_FOR_FUNCTIONCALL
- Flag const definitions with constant expression initializers.
no enforcement