AUTOSAR C++14 Rule M3-9-1
The types used for an object, a function return type, or a function parameter shall be token-for-token identical in all declarations and re-declarations
Description
Rule Definition
The types used for an object, a function return type, or a function parameter shall be token-for-token identical in all declarations and re-declarations.
Rationale
If a redeclaration is not token-for-token identical to the previous declaration, it is not clear from visual inspection which object or function is being redeclared.
Polyspace Implementation
The rule checker compares the current declaration with the last seen declaration.
Troubleshooting
If you expect a rule violation but Polyspace® does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Basic Concepts |
Category: Required, Automated |
Version History
Introduced in R2019a