主要内容

AUTOSAR C++14 Rule M8-4-2

The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration

描述

规则定义

The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration.

Polyspace 实现

检查项会检测下列项之间的参数名称不匹配情况:

  • 函数声明与对应的函数定义。

  • 同一文件中出现的同一函数的两次声明。

    如果声明出现在不同的文件中,则检查项不会因为参数名称不匹配而报告违规。AUTOSAR C++14 Rule M3-2-3 禁止在不同文件中重复声明。

故障排除

如果您预期会出现违规,而 Polyspace® 未报告该违规,请参阅诊断为何编码规范违规未按预期显示

检查信息

组:声明符
类别:必需、自动

版本历史记录

在 R2019a 中推出