メインコンテンツ

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 実装

チェッカーは、次の間でのパラメーター名の不一致を検出します。

  • 関数宣言とそれに対応する定義。

  • 同じファイルに現れる、1 つの関数の 2 つの宣言。

    これらの宣言が異なるファイルに現れる場合、チェッカーは、パラメーター名の不一致について違反を報告しません。異なるファイルでの再宣言は、AUTOSAR C++14 Rule M3-2-3 で禁止されています。

トラブルシューティング

ルール違反が想定されるものの、Polyspace® から報告されない場合は、コーディング規約違反が想定どおりに表示されない理由の診断を参照してください。

チェック情報

グループ: 宣言子
カテゴリ: Required、Automated

バージョン履歴

R2019a で導入