adlint 3.0.4 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +374 -13
- data/INSTALL +1 -3
- data/MANIFEST +12 -0
- data/NEWS +30 -4
- data/README +0 -4
- data/TODO +2 -1
- data/etc/mesg.d/c_builtin/en_US/messages.yml +2 -2
- data/etc/mesg.d/c_builtin/ja_JP/messages.yml +2 -2
- data/etc/mesg.d/core/en_US/messages.yml +5 -1
- data/etc/mesg.d/core/ja_JP/messages.yml +5 -1
- data/features/code_check/W0422.feature +128 -0
- data/features/code_check/W0491.feature +57 -0
- data/features/code_check/W0492.feature +80 -0
- data/features/code_check/W0542.feature +20 -0
- data/features/code_check/W0580.feature +25 -0
- data/features/code_check/W0610.feature +36 -0
- data/features/code_check/W0642.feature +67 -0
- data/features/code_check/W0786.feature +39 -0
- data/features/code_check/W0830.feature +27 -0
- data/features/code_check/W1047.feature +72 -0
- data/features/code_check/W9003.feature +22 -0
- data/features/code_extraction/TODO +1 -0
- data/features/metric_measurement/TODO +1 -0
- data/lib/adlint/analyzer.rb +2 -2
- data/lib/adlint/cc1/ctrlexpr.rb +27 -6
- data/lib/adlint/cc1/domain.rb +72 -12
- data/lib/adlint/cc1/enum.rb +4 -0
- data/lib/adlint/cc1/expr.rb +31 -29
- data/lib/adlint/cc1/interp.rb +45 -56
- data/lib/adlint/cc1/lexer.rb +26 -5
- data/lib/adlint/cc1/mediator.rb +35 -6
- data/lib/adlint/cc1/object.rb +62 -19
- data/lib/adlint/cc1/parser.rb +948 -904
- data/lib/adlint/cc1/parser.y +59 -29
- data/lib/adlint/cc1/phase.rb +6 -8
- data/lib/adlint/cc1/syntax.rb +70 -17
- data/lib/adlint/cc1/util.rb +4 -4
- data/lib/adlint/code.rb +16 -6
- data/lib/adlint/cpp/eval.rb +31 -25
- data/lib/adlint/cpp/lexer.rb +11 -5
- data/lib/adlint/cpp/macro.rb +34 -7
- data/lib/adlint/cpp/phase.rb +8 -8
- data/lib/adlint/error.rb +6 -0
- data/lib/adlint/exam/c_builtin/cc1_check.rb +557 -594
- data/lib/adlint/exam/c_builtin/cc1_check_shima.rb +72 -72
- data/lib/adlint/exam/c_builtin/cc1_code.rb +72 -52
- data/lib/adlint/exam/c_builtin/cc1_metric.rb +131 -131
- data/lib/adlint/exam/c_builtin/cpp_check.rb +48 -48
- data/lib/adlint/exam/c_builtin/cpp_check_shima.rb +2 -2
- data/lib/adlint/exam/c_builtin/cpp_code.rb +21 -21
- data/lib/adlint/exam/c_builtin/ld_check.rb +88 -87
- data/lib/adlint/exam/c_builtin/ld_metric.rb +4 -5
- data/lib/adlint/exam/c_builtin.rb +6 -6
- data/lib/adlint/ld/object.rb +269 -186
- data/lib/adlint/ld/phase.rb +19 -19
- data/lib/adlint/ld/typedef.rb +7 -7
- data/lib/adlint/ld/util.rb +25 -17
- data/lib/adlint/location.rb +6 -1
- data/lib/adlint/memo.rb +66 -13
- data/lib/adlint/prelude.rb +2 -2
- data/lib/adlint/report.rb +13 -14
- data/lib/adlint/util.rb +1 -1
- data/lib/adlint/version.rb +2 -2
- data/share/doc/Makefile +6 -2
- data/share/doc/c99gram.dot +502 -0
- data/share/doc/c99gram.pdf +0 -0
- data/share/doc/developers_guide_ja.html +4 -3
- data/share/doc/developers_guide_ja.texi +2 -1
- data/share/doc/users_guide_en.html +9 -9
- data/share/doc/users_guide_en.texi +7 -7
- data/share/doc/users_guide_ja.html +9 -9
- data/share/doc/users_guide_ja.texi +7 -7
- metadata +14 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
@setfilename users_guide_en.info
|
3
3
|
@documentlanguage en
|
4
4
|
@documentencoding utf-8
|
5
|
-
@settitle AdLint 3.0.
|
5
|
+
@settitle AdLint 3.0.8 User's Guide
|
6
6
|
|
7
7
|
@copying
|
8
8
|
Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
|
@@ -2898,7 +2898,7 @@ context_line
|
|
2898
2898
|
* W0639::%sth conversion specifier doesn't match with corresponding type of actual argument.
|
2899
2899
|
* W0640::The actual argument of scanf function have to pass the object pointer to store the data.
|
2900
2900
|
* W0641::Floating-point number type cast to pointer to object and vice versa.
|
2901
|
-
* W0642::
|
2901
|
+
* W0642::Address derivation from the object declared as `register' is prohibited.
|
2902
2902
|
* W0643::This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
|
2903
2903
|
* W0644::A value in void statement is going to use. 'void' statement doesn't have a value.
|
2904
2904
|
* W0645::'void' type cannot use in the type of formal argument.
|
@@ -26538,7 +26538,7 @@ None.
|
|
26538
26538
|
|
26539
26539
|
@subsection Message body
|
26540
26540
|
|
26541
|
-
|
26541
|
+
Address derivation from the object declared as `register' is prohibited.
|
26542
26542
|
|
26543
26543
|
@subsection Content
|
26544
26544
|
|
@@ -26591,7 +26591,7 @@ const char *str = MACRO(foo\); /* W0643 */
|
|
26591
26591
|
@subsection Related message
|
26592
26592
|
|
26593
26593
|
@itemize
|
26594
|
-
@item @ref{W0642}
|
26594
|
+
@item @ref{W0642} Address derivation from the object declared as `register' is prohibited.
|
26595
26595
|
@item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value.
|
26596
26596
|
@item @ref{W0645} 'void' type cannot use in the type of formal argument.
|
26597
26597
|
@item @ref{W0646} A normal string literal and a wide string literal are contiguous.
|
@@ -26627,7 +26627,7 @@ int bar(void)
|
|
26627
26627
|
@subsection Related message
|
26628
26628
|
|
26629
26629
|
@itemize
|
26630
|
-
@item @ref{W0642}
|
26630
|
+
@item @ref{W0642} Address derivation from the object declared as `register' is prohibited.
|
26631
26631
|
@item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
|
26632
26632
|
@item @ref{W0645} 'void' type cannot use in the type of formal argument.
|
26633
26633
|
@item @ref{W0646} A normal string literal and a wide string literal are contiguous.
|
@@ -26661,7 +26661,7 @@ void a;
|
|
26661
26661
|
@subsection Related message
|
26662
26662
|
|
26663
26663
|
@itemize
|
26664
|
-
@item @ref{W0642}
|
26664
|
+
@item @ref{W0642} Address derivation from the object declared as `register' is prohibited.
|
26665
26665
|
@item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
|
26666
26666
|
@item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value.
|
26667
26667
|
@item @ref{W0646} A normal string literal and a wide string literal are contiguous.
|
@@ -26692,7 +26692,7 @@ static const char *str = "foo" L"bar"; /* W0646 */
|
|
26692
26692
|
@subsection Related message
|
26693
26693
|
|
26694
26694
|
@itemize
|
26695
|
-
@item @ref{W0642}
|
26695
|
+
@item @ref{W0642} Address derivation from the object declared as `register' is prohibited.
|
26696
26696
|
@item @ref{W0643} This string literal constituted by a macro is illegal form unenclosed by `"'. `#'operator may apply to actual argument which has '\' at the end.
|
26697
26697
|
@item @ref{W0644} A value in void statement is going to use. 'void' statement doesn't have a value.
|
26698
26698
|
@item @ref{W0645} 'void' type cannot use in the type of formal argument.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<html lang="ja">
|
2
2
|
<head>
|
3
|
-
<title>AdLint 3.0.
|
3
|
+
<title>AdLint 3.0.8 利用者ガイド</title>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
-
<meta name="description" content="AdLint 3.0.
|
5
|
+
<meta name="description" content="AdLint 3.0.8 利用者ガイド">
|
6
6
|
<meta name="generator" content="makeinfo 4.13">
|
7
7
|
<link title="Top" rel="top" href="#Top">
|
8
8
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
@@ -44,7 +44,7 @@ td { border: 1px solid black; }
|
|
44
44
|
--></style>
|
45
45
|
</head>
|
46
46
|
<body>
|
47
|
-
<h1 class="settitle">AdLint 3.0.
|
47
|
+
<h1 class="settitle">AdLint 3.0.8 利用者ガイド</h1>
|
48
48
|
<div class="node">
|
49
49
|
<a name="Top"></a>
|
50
50
|
<p><hr>
|
@@ -2927,7 +2927,7 @@ Up: <a rel="up" accesskey="u" href="#Top">Top</a>
|
|
2927
2927
|
<li><a href="#W0639">W0639</a>: %s 番目の変換指定子と、対応する実引数の型が合いません。
|
2928
2928
|
<li><a href="#W0640">W0640</a>: scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。
|
2929
2929
|
<li><a href="#W0641">W0641</a>: 浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。
|
2930
|
-
<li><a href="#W0642">W0642</a>: register
|
2930
|
+
<li><a href="#W0642">W0642</a>: register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
2931
2931
|
<li><a href="#W0643">W0643</a>: このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
2932
2932
|
<li><a href="#W0644">W0644</a>: void 式の値を使用しようとしています。void 式は値をもちません。
|
2933
2933
|
<li><a href="#W0645">W0645</a>: 仮引数の型には、void 型を使うことができません。
|
@@ -31008,7 +31008,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
31008
31008
|
|
31009
31009
|
<h4 class="subsection">6.524.1 メッセージ本文</h4>
|
31010
31010
|
|
31011
|
-
<p>register
|
31011
|
+
<p>register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
31012
31012
|
|
31013
31013
|
<h4 class="subsection">6.524.2 内容</h4>
|
31014
31014
|
|
@@ -31068,7 +31068,7 @@ const char *str = MACRO(foo\); /* W0643 */
|
|
31068
31068
|
<h4 class="subsection">6.525.4 関連メッセージ</h4>
|
31069
31069
|
|
31070
31070
|
<ul>
|
31071
|
-
<li><a href="#W0642">W0642</a> register
|
31071
|
+
<li><a href="#W0642">W0642</a> register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
31072
31072
|
<li><a href="#W0644">W0644</a> void 式の値を使用しようとしています。void 式は値をもちません。
|
31073
31073
|
<li><a href="#W0645">W0645</a> 仮引数の型には、void 型を使うことができません。
|
31074
31074
|
<li><a href="#W0646">W0646</a> 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -31112,7 +31112,7 @@ int bar(void)
|
|
31112
31112
|
<h4 class="subsection">6.526.4 関連メッセージ</h4>
|
31113
31113
|
|
31114
31114
|
<ul>
|
31115
|
-
<li><a href="#W0642">W0642</a> register
|
31115
|
+
<li><a href="#W0642">W0642</a> register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
31116
31116
|
<li><a href="#W0643">W0643</a> このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
31117
31117
|
<li><a href="#W0645">W0645</a> 仮引数の型には、void 型を使うことができません。
|
31118
31118
|
<li><a href="#W0646">W0646</a> 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -31154,7 +31154,7 @@ void a;
|
|
31154
31154
|
<h4 class="subsection">6.527.4 関連メッセージ</h4>
|
31155
31155
|
|
31156
31156
|
<ul>
|
31157
|
-
<li><a href="#W0642">W0642</a> register
|
31157
|
+
<li><a href="#W0642">W0642</a> register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
31158
31158
|
<li><a href="#W0643">W0643</a> このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
31159
31159
|
<li><a href="#W0644">W0644</a> void 式の値を使用しようとしています。void 式は値をもちません。
|
31160
31160
|
<li><a href="#W0646">W0646</a> 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -31193,7 +31193,7 @@ Up: <a rel="up" accesskey="u" href="#Messages">Messages</a>
|
|
31193
31193
|
<h4 class="subsection">6.528.4 関連メッセージ</h4>
|
31194
31194
|
|
31195
31195
|
<ul>
|
31196
|
-
<li><a href="#W0642">W0642</a> register
|
31196
|
+
<li><a href="#W0642">W0642</a> register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
31197
31197
|
<li><a href="#W0643">W0643</a> このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
31198
31198
|
<li><a href="#W0644">W0644</a> void 式の値を使用しようとしています。void 式は値をもちません。
|
31199
31199
|
<li><a href="#W0645">W0645</a> 仮引数の型には、void 型を使うことができません。
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@setfilename users_guide_ja.info
|
3
3
|
@documentlanguage ja
|
4
4
|
@documentencoding utf-8
|
5
|
-
@settitle AdLint 3.0.
|
5
|
+
@settitle AdLint 3.0.8 利用者ガイド
|
6
6
|
|
7
7
|
@copying
|
8
8
|
Copyright (C) 2010-2013, OGIS-RI Co.,Ltd.
|
@@ -2958,7 +2958,7 @@ context_line
|
|
2958
2958
|
* W0639::%s 番目の変換指定子と、対応する実引数の型が合いません。
|
2959
2959
|
* W0640::scanf 関数の実引数にはデータを格納するオブジェクトのポインタを渡さなければいけません。
|
2960
2960
|
* W0641::浮動小数点数型をオブジェクトへのポインタ(あるいはその逆)へキャストしています。
|
2961
|
-
* W0642::register
|
2961
|
+
* W0642::register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
2962
2962
|
* W0643::このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
2963
2963
|
* W0644::void 式の値を使用しようとしています。void 式は値をもちません。
|
2964
2964
|
* W0645::仮引数の型には、void 型を使うことができません。
|
@@ -26851,7 +26851,7 @@ int *foo(const float f)
|
|
26851
26851
|
|
26852
26852
|
@subsection メッセージ本文
|
26853
26853
|
|
26854
|
-
register
|
26854
|
+
register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
26855
26855
|
|
26856
26856
|
@subsection 内容
|
26857
26857
|
|
@@ -26904,7 +26904,7 @@ const char *str = MACRO(foo\); /* W0643 */
|
|
26904
26904
|
@subsection 関連メッセージ
|
26905
26905
|
|
26906
26906
|
@itemize
|
26907
|
-
@item @ref{W0642} register
|
26907
|
+
@item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
26908
26908
|
@item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。
|
26909
26909
|
@item @ref{W0645} 仮引数の型には、void 型を使うことができません。
|
26910
26910
|
@item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -26940,7 +26940,7 @@ int bar(void)
|
|
26940
26940
|
@subsection 関連メッセージ
|
26941
26941
|
|
26942
26942
|
@itemize
|
26943
|
-
@item @ref{W0642} register
|
26943
|
+
@item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
26944
26944
|
@item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
26945
26945
|
@item @ref{W0645} 仮引数の型には、void 型を使うことができません。
|
26946
26946
|
@item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -26974,7 +26974,7 @@ void a;
|
|
26974
26974
|
@subsection 関連メッセージ
|
26975
26975
|
|
26976
26976
|
@itemize
|
26977
|
-
@item @ref{W0642} register
|
26977
|
+
@item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
26978
26978
|
@item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
26979
26979
|
@item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。
|
26980
26980
|
@item @ref{W0646} 通常の文字列リテラルとワイド文字列リテラルが隣接しています。
|
@@ -27005,7 +27005,7 @@ static const char *str = "foo" L"bar"; /* W0646 */
|
|
27005
27005
|
@subsection 関連メッセージ
|
27006
27006
|
|
27007
27007
|
@itemize
|
27008
|
-
@item @ref{W0642} register
|
27008
|
+
@item @ref{W0642} register 指定で宣言されたオブジェクトのアドレスを得ることは不可能です。
|
27009
27009
|
@item @ref{W0643} このマクロで構成された文字列リテラルは、`"' で囲まれていない不正な形式です。マクロ内の `#' 演算子が `\' が末尾にある実引数に適用された結果である可能性があります。
|
27010
27010
|
@item @ref{W0644} void 式の値を使用しようとしています。void 式は値をもちません。
|
27011
27011
|
@item @ref{W0645} 仮引数の型には、void 型を使うことができません。
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'AdLint is a source code static analyzer.
|
15
15
|
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- features/code_check/W0252.feature
|
224
224
|
- features/code_check/W0253.feature
|
225
225
|
- features/code_check/W0254.feature
|
226
|
+
- features/code_check/W0422.feature
|
226
227
|
- features/code_check/W0425.feature
|
227
228
|
- features/code_check/W0431.feature
|
228
229
|
- features/code_check/W0432.feature
|
@@ -237,6 +238,8 @@ files:
|
|
237
238
|
- features/code_check/W0488.feature
|
238
239
|
- features/code_check/W0489.feature
|
239
240
|
- features/code_check/W0490.feature
|
241
|
+
- features/code_check/W0491.feature
|
242
|
+
- features/code_check/W0492.feature
|
240
243
|
- features/code_check/W0495.feature
|
241
244
|
- features/code_check/W0496.feature
|
242
245
|
- features/code_check/W0497.feature
|
@@ -246,16 +249,20 @@ files:
|
|
246
249
|
- features/code_check/W0501.feature
|
247
250
|
- features/code_check/W0502.feature
|
248
251
|
- features/code_check/W0534.feature
|
252
|
+
- features/code_check/W0542.feature
|
249
253
|
- features/code_check/W0573.feature
|
254
|
+
- features/code_check/W0580.feature
|
250
255
|
- features/code_check/W0582.feature
|
251
256
|
- features/code_check/W0583.feature
|
252
257
|
- features/code_check/W0584.feature
|
253
258
|
- features/code_check/W0585.feature
|
254
259
|
- features/code_check/W0599.feature
|
255
260
|
- features/code_check/W0606.feature
|
261
|
+
- features/code_check/W0610.feature
|
256
262
|
- features/code_check/W0611.feature
|
257
263
|
- features/code_check/W0635.feature
|
258
264
|
- features/code_check/W0641.feature
|
265
|
+
- features/code_check/W0642.feature
|
259
266
|
- features/code_check/W0643.feature
|
260
267
|
- features/code_check/W0644.feature
|
261
268
|
- features/code_check/W0645.feature
|
@@ -324,6 +331,7 @@ files:
|
|
324
331
|
- features/code_check/W0780.feature
|
325
332
|
- features/code_check/W0781.feature
|
326
333
|
- features/code_check/W0783.feature
|
334
|
+
- features/code_check/W0786.feature
|
327
335
|
- features/code_check/W0787.feature
|
328
336
|
- features/code_check/W0792.feature
|
329
337
|
- features/code_check/W0793.feature
|
@@ -370,6 +378,8 @@ files:
|
|
370
378
|
- features/code_check/W1077.feature
|
371
379
|
- features/code_check/W9001.feature
|
372
380
|
- features/code_check/W9003.feature
|
381
|
+
- features/code_extraction/TODO
|
382
|
+
- features/metric_measurement/TODO
|
373
383
|
- features/step_definitions/code_check_steps.rb
|
374
384
|
- features/support/env.rb
|
375
385
|
- lib/adlint.rb
|
@@ -586,6 +596,8 @@ files:
|
|
586
596
|
- share/doc/adlint_on_eclipse_ja.png
|
587
597
|
- share/doc/adlint_on_vim_en.png
|
588
598
|
- share/doc/adlint_on_vim_ja.png
|
599
|
+
- share/doc/c99gram.dot
|
600
|
+
- share/doc/c99gram.pdf
|
589
601
|
- share/doc/developers_guide_ja.html
|
590
602
|
- share/doc/developers_guide_ja.texi
|
591
603
|
- share/doc/gen_mesg_sections.rb
|