C and C++


LANG.COMM.SPLICE : //コメント内の行継続記号

要旨

C++スタイルのコメント(//)内に行継続記号(\)とそれに続く改行が含まれています。

プロパティ

クラス名 Line Splicing in Comment
日本語クラス名 //コメント内の行継続記号
クラス分類 スタイル (style)
ニーモニック LANG.COMM.SPLICE
カテゴリー
MisraC2023 MisraC2023:3.2 Line-splicing shall not be used in // comments
Misra2012 Misra2012:3.2 Line-splicing shall not be used in // comments
AUTOSARC++14 AUTOSARC++14:A2-7-1 The character \ shall not occur as a last character of a C++ comment.
MisraC++2023 MisraC++2023:5.7.3 Line-splicing shall not be used in // comments
JSF++ JSF++:126 Only valid C++ style comments (//) shall be used.
対応言語 C および C++ で利用可能です。
有効/無効設定 このワーニングクラスのチェックはデフォルトで無効になっています。チェックを有効にするにはプロジェクト設定ファイル (configuration file)に以下の WARNING_FILTER ルールを追加してください。
WARNING_FILTER += allow class="Line Splicing in Comment"

/* line splicing in this comment is ok \
 * because it's a C-style comment */

     /* 'Line Splicing in Comment' warning issued on following line */
// line splicing in this comment is not ok \
   because it's a C++-style comment 

// this comment \ does not use line splicing (backslash is not followed by newline)

関連のある設定ファイルパラメータ

設定ファイルの以下のパラメータがこのワーニングクラスのチェックに影響します。