adlint 2.4.0 → 2.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/adlint/c/type.rb CHANGED
@@ -1707,6 +1707,10 @@ module C #:nodoc:
1707
1707
  def_delegator :@base_type, :compatible?
1708
1708
  def_delegator :@base_type, :coercible?
1709
1709
 
1710
+ def convertible?(to_type)
1711
+ real_type.unqualify.convertible?(to_type.real_type.unqualify)
1712
+ end
1713
+
1710
1714
  def more_cv_qualified?(than_type)
1711
1715
  # NOTE: The term `more cv-qualified' means:
1712
1716
  # const > none
@@ -1862,8 +1866,24 @@ module C #:nodoc:
1862
1866
  class QualifiedTypeId < TypeId
1863
1867
  def initialize(base_type, cvr_qualifiers)
1864
1868
  super(create_value(base_type, cvr_qualifiers))
1869
+
1870
+ @base_type = base_type
1871
+ @cvr_qualifiers = cvr_qualifiers.sort
1865
1872
  end
1866
1873
 
1874
+ def ==(rhs)
1875
+ case rhs
1876
+ when QualifiedTypeId
1877
+ @cvr_qualifiers == rhs.cvr_qualifiers && @base_type == rhs.base_type
1878
+ else
1879
+ false
1880
+ end
1881
+ end
1882
+
1883
+ protected
1884
+ attr_reader :base_type
1885
+ attr_reader :cvr_qualifiers
1886
+
1867
1887
  private
1868
1888
  def create_value(base_type, cvr_qualifiers)
1869
1889
  value = base_type.real_type.brief_image
@@ -7411,7 +7431,7 @@ module C #:nodoc:
7411
7431
  type_id = create_union_type_id(type_specifiers)
7412
7432
  when EnumSpecifier
7413
7433
  type_id = create_enum_type_id(type_specifiers)
7414
- when NilClass
7434
+ when nil
7415
7435
  type_id = IntTypeId.new
7416
7436
  else
7417
7437
  raise TypeError
@@ -52,7 +52,6 @@ module C #:nodoc:
52
52
  # <--- CompositeValue
53
53
  # <--- MultipleValue
54
54
  # <--- VersionedValue
55
- # <--- FrozenValue
56
55
  class Value
57
56
  include BuggyValueSampler
58
57
 
@@ -2383,72 +2382,5 @@ module C #:nodoc:
2383
2382
  private_constant :Version
2384
2383
  end
2385
2384
 
2386
- class FrozenValue < Value
2387
- def initialize(versioned_value)
2388
- @versioned_value = versioned_value
2389
- end
2390
-
2391
- extend Forwardable
2392
-
2393
- def_delegator :@versioned_value, :scalar?
2394
- def_delegator :@versioned_value, :array?
2395
- def_delegator :@versioned_value, :composite?
2396
- def_delegator :@versioned_value, :undefined?
2397
- def_delegator :@versioned_value, :exist?
2398
- def_delegator :@versioned_value, :definite?
2399
- def_delegator :@versioned_value, :contain?
2400
- def_delegator :@versioned_value, :multiple?
2401
- def_delegator :@versioned_value, :enter_versioning_group
2402
- def_delegator :@versioned_value, :leave_versioning_group
2403
- def_delegator :@versioned_value, :begin_versioning
2404
- def_delegator :@versioned_value, :end_versioning
2405
- def_delegator :@versioned_value, :rollback_latest_version!
2406
- def_delegator :@versioned_value, :rollback_all_versions!
2407
- def_delegator :@versioned_value, :single_value_unified_with
2408
- def_delegator :@versioned_value, :~
2409
- def_delegator :@versioned_value, :+@
2410
- def_delegator :@versioned_value, :-@
2411
- def_delegator :@versioned_value, :+
2412
- def_delegator :@versioned_value, :-
2413
- def_delegator :@versioned_value, :*
2414
- def_delegator :@versioned_value, :/
2415
- def_delegator :@versioned_value, :%
2416
- def_delegator :@versioned_value, :&
2417
- def_delegator :@versioned_value, :|
2418
- def_delegator :@versioned_value, :^
2419
- def_delegator :@versioned_value, :<<
2420
- def_delegator :@versioned_value, :>>
2421
- def_delegator :@versioned_value, :!
2422
- def_delegator :@versioned_value, :<
2423
- def_delegator :@versioned_value, :>
2424
- def_delegator :@versioned_value, :==
2425
- def_delegator :@versioned_value, :!=
2426
- def_delegator :@versioned_value, :<=
2427
- def_delegator :@versioned_value, :>=
2428
- def_delegator :@versioned_value, :logical_and
2429
- def_delegator :@versioned_value, :logical_or
2430
- def_delegator :@versioned_value, :must_be_equal_to?
2431
- def_delegator :@versioned_value, :may_be_equal_to?
2432
- def_delegator :@versioned_value, :must_not_be_equal_to?
2433
- def_delegator :@versioned_value, :may_not_be_equal_to?
2434
- def_delegator :@versioned_value, :must_be_less_than?
2435
- def_delegator :@versioned_value, :may_be_less_than?
2436
- def_delegator :@versioned_value, :must_be_greater_than?
2437
- def_delegator :@versioned_value, :may_be_greater_than?
2438
- def_delegator :@versioned_value, :must_be_undefined?
2439
- def_delegator :@versioned_value, :may_be_undefined?
2440
- def_delegator :@versioned_value, :must_be_true?
2441
- def_delegator :@versioned_value, :may_be_true?
2442
- def_delegator :@versioned_value, :must_be_false?
2443
- def_delegator :@versioned_value, :may_be_false?
2444
- def_delegator :@versioned_value, :coerce_to
2445
- def_delegator :@versioned_value, :to_enum
2446
- def_delegator :@versioned_value, :to_single_value
2447
- def_delegator :@versioned_value, :to_defined_value
2448
- def_delegator :@versioned_value, :eql?
2449
- def_delegator :@versioned_value, :hash
2450
- def_delegator :@versioned_value, :dup
2451
- end
2452
-
2453
2385
  end
2454
2386
  end
@@ -686,7 +686,7 @@ module Cpp #:nodoc:
686
686
 
687
687
  base_fpath = Pathname.new(basename)
688
688
  if base_fpath.absolute? && base_fpath.readable?
689
- return [base_fpath]
689
+ [base_fpath]
690
690
  else
691
691
  result = []
692
692
  include_paths.each do |dpath|
@@ -713,7 +713,7 @@ module Cpp #:nodoc:
713
713
 
714
714
  base_fpath = Pathname.new(basename)
715
715
  if base_fpath.absolute? && base_fpath.readable?
716
- return [base_fpath]
716
+ [base_fpath]
717
717
  else
718
718
  result = []
719
719
  include_paths.each do |dpath|
@@ -33,8 +33,8 @@ module AdLint #:nodoc:
33
33
 
34
34
  MAJOR_VERSION = 2
35
35
  MINOR_VERSION = 4
36
- PATCH_VERSION = 0
37
- RELEASE_DATE = "2012-09-21"
36
+ PATCH_VERSION = 6
37
+ RELEASE_DATE = "2012-10-09"
38
38
 
39
39
  TRAITS_SCHEMA_VERSION = "2.4.0"
40
40
 
@@ -1,8 +1,8 @@
1
1
  <html lang="ja">
2
2
  <head>
3
- <title>AdLint 2.4.0 開発者ガイド</title>
3
+ <title>AdLint 2.4.6 開発者ガイド</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 2.4.0 開発者ガイド">
5
+ <meta name="description" content="AdLint 2.4.6 開発者ガイド">
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 2.4.0 開発者ガイド</h1>
47
+ <h1 class="settitle">AdLint 2.4.6 開発者ガイド</h1>
48
48
  <div class="contents">
49
49
  <h2>Table of Contents</h2>
50
50
  <ul>
@@ -2,7 +2,7 @@
2
2
  @setfilename developers_guide_ja.info
3
3
  @documentlanguage ja
4
4
  @documentencoding utf-8
5
- @settitle AdLint 2.4.0 開発者ガイド
5
+ @settitle AdLint 2.4.6 開発者ガイド
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -1,8 +1,8 @@
1
1
  <html lang="en">
2
2
  <head>
3
- <title>AdLint 2.4.0 User's Guide</title>
3
+ <title>AdLint 2.4.6 User's Guide</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 2.4.0 User's Guide">
5
+ <meta name="description" content="AdLint 2.4.6 User's Guide">
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 2.4.0 User's Guide</h1>
47
+ <h1 class="settitle">AdLint 2.4.6 User's Guide</h1>
48
48
  <div class="node">
49
49
  <a name="Top"></a>
50
50
  <p><hr>
@@ -1468,7 +1468,7 @@ examination package, message category and message severity to the <a href="#Mess
1468
1468
  </td><td valign="top" width="10%">
1469
1469
  array of string
1470
1470
  </td><td valign="top" width="0%">
1471
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1471
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1472
1472
 
1473
1473
  <p>If a directory path is specified, AdLint will output warning messages about
1474
1474
  source files located under the specified directory.
@@ -1480,7 +1480,7 @@ the target source files such as system headers or 3rd-party library headers.
1480
1480
  </td><td valign="top" width="10%">
1481
1481
  array of string
1482
1482
  </td><td valign="top" width="0%">
1483
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1483
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1484
1484
 
1485
1485
  <p>If a directory path is specified, AdLint will suppress warning messages about
1486
1486
  source files located under the specified directory.
@@ -1490,7 +1490,7 @@ source files located under the specified directory.
1490
1490
  </td><td valign="top" width="10%">
1491
1491
  boolean
1492
1492
  </td><td valign="top" width="0%">
1493
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1493
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1494
1494
 
1495
1495
  <p>This item enables code check selection by annotations in the target source
1496
1496
  files.
@@ -1502,7 +1502,7 @@ files.
1502
1502
  </td><td valign="top" width="10%">
1503
1503
  array of string
1504
1504
  </td><td valign="top" width="0%">
1505
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1505
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1506
1506
 
1507
1507
  <p>This item represents excluding code checks by its message categories.
1508
1508
  <br></td></tr><tr align="left"><td valign="top" width="1%">7
@@ -1511,7 +1511,7 @@ array of string
1511
1511
  </td><td valign="top" width="10%">
1512
1512
  regexp string
1513
1513
  </td><td valign="top" width="0%">
1514
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1514
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1515
1515
 
1516
1516
  <p>This item represents excluding code checks by its message severities.
1517
1517
  <br></td></tr><tr align="left"><td valign="top" width="1%">8
@@ -1520,7 +1520,7 @@ regexp string
1520
1520
  </td><td valign="top" width="10%">
1521
1521
  map of Message ID and string
1522
1522
  </td><td valign="top" width="0%">
1523
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1523
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1524
1524
 
1525
1525
  <p>This item represents excluding code checks by its message ID.
1526
1526
 
@@ -1532,7 +1532,7 @@ also specify the name of the examination package including the message.
1532
1532
  </td><td valign="top" width="10%">
1533
1533
  map of Message ID and string
1534
1534
  </td><td valign="top" width="0%">
1535
- <b>This item has no effect on AdLint 2.4.0, yet.</b>
1535
+ <b>This item has no effect on AdLint 2.4.6, yet.</b>
1536
1536
 
1537
1537
  <p>This item represents messages which is excluded by settings of <code>exclusion</code>
1538
1538
  section but will be used by AdLint.
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_en.info
3
3
  @documentlanguage en
4
4
  @documentencoding utf-8
5
- @settitle AdLint 2.4.0 User's Guide
5
+ @settitle AdLint 2.4.6 User's Guide
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -1407,7 +1407,7 @@ File, message file}.
1407
1407
  @tab
1408
1408
  array of string
1409
1409
  @tab
1410
- @b{This item has no effect on AdLint 2.4.0, yet.}
1410
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1411
1411
 
1412
1412
  If a directory path is specified, AdLint will output warning messages about
1413
1413
  source files located under the specified directory.
@@ -1421,7 +1421,7 @@ the target source files such as system headers or 3rd-party library headers.
1421
1421
  @tab
1422
1422
  array of string
1423
1423
  @tab
1424
- @b{This item has no effect on AdLint 2.4.0, yet.}
1424
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1425
1425
 
1426
1426
  If a directory path is specified, AdLint will suppress warning messages about
1427
1427
  source files located under the specified directory.
@@ -1433,7 +1433,7 @@ source files located under the specified directory.
1433
1433
  @tab
1434
1434
  boolean
1435
1435
  @tab
1436
- @b{This item has no effect on AdLint 2.4.0, yet.}
1436
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1437
1437
 
1438
1438
  This item enables code check selection by annotations in the target source
1439
1439
  files.
@@ -1447,7 +1447,7 @@ In case of @code{true}, code check selection by annotations will be enabled.
1447
1447
  @tab
1448
1448
  array of string
1449
1449
  @tab
1450
- @b{This item has no effect on AdLint 2.4.0, yet.}
1450
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1451
1451
 
1452
1452
  This item represents excluding code checks by its message categories.
1453
1453
  @item 7
@@ -1458,7 +1458,7 @@ This item represents excluding code checks by its message categories.
1458
1458
  @tab
1459
1459
  regexp string
1460
1460
  @tab
1461
- @b{This item has no effect on AdLint 2.4.0, yet.}
1461
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1462
1462
 
1463
1463
  This item represents excluding code checks by its message severities.
1464
1464
  @item 8
@@ -1469,7 +1469,7 @@ This item represents excluding code checks by its message severities.
1469
1469
  @tab
1470
1470
  map of Message ID and string
1471
1471
  @tab
1472
- @b{This item has no effect on AdLint 2.4.0, yet.}
1472
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1473
1473
 
1474
1474
  This item represents excluding code checks by its message ID.
1475
1475
 
@@ -1483,7 +1483,7 @@ also specify the name of the examination package including the message.
1483
1483
  @tab
1484
1484
  map of Message ID and string
1485
1485
  @tab
1486
- @b{This item has no effect on AdLint 2.4.0, yet.}
1486
+ @b{This item has no effect on AdLint 2.4.6, yet.}
1487
1487
 
1488
1488
  This item represents messages which is excluded by settings of @code{exclusion}
1489
1489
  section but will be used by AdLint.
@@ -1,8 +1,8 @@
1
1
  <html lang="ja">
2
2
  <head>
3
- <title>AdLint 2.4.0 利用者ガイド</title>
3
+ <title>AdLint 2.4.6 利用者ガイド</title>
4
4
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
- <meta name="description" content="AdLint 2.4.0 利用者ガイド">
5
+ <meta name="description" content="AdLint 2.4.6 利用者ガイド">
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 2.4.0 利用者ガイド</h1>
47
+ <h1 class="settitle">AdLint 2.4.6 利用者ガイド</h1>
48
48
  <div class="node">
49
49
  <a name="Top"></a>
50
50
  <p><hr>
@@ -1533,7 +1533,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1533
1533
  </td><td valign="top" width="10%">
1534
1534
  文字列の配列
1535
1535
  </td><td valign="top" width="0%">
1536
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1536
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1537
1537
 
1538
1538
  <p>ディレクトリパス名を指定した場合は、そのディレクトリ配下のソースコードについて
1539
1539
  のみ、警告メッセージを出力します。
@@ -1546,7 +1546,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1546
1546
  </td><td valign="top" width="10%">
1547
1547
  文字列の配列
1548
1548
  </td><td valign="top" width="0%">
1549
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1549
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1550
1550
 
1551
1551
  <p>ディレクトリパス名を指定した場合は、そのディレクトリ配下のソースコードについて
1552
1552
  は、警告メッセージを抑止します。
@@ -1556,7 +1556,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1556
1556
  </td><td valign="top" width="10%">
1557
1557
  真偽値
1558
1558
  </td><td valign="top" width="0%">
1559
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1559
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1560
1560
 
1561
1561
  <p>解析対象ソースコード内の注釈によるコードチェックの選択機能を有効化します。
1562
1562
 
@@ -1567,7 +1567,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1567
1567
  </td><td valign="top" width="10%">
1568
1568
  文字列の配列
1569
1569
  </td><td valign="top" width="0%">
1570
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1570
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1571
1571
 
1572
1572
  <p><a href="#global_005ftraits_003aexam_005fpackages">exam_packages</a> で指定したソースコード検査パッ
1573
1573
  ケージ中のコードチェック機能で、実行を除外するものをメッセージのカテゴリにより
@@ -1578,7 +1578,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1578
1578
  </td><td valign="top" width="10%">
1579
1579
  正規表現を表す文字列
1580
1580
  </td><td valign="top" width="0%">
1581
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1581
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1582
1582
 
1583
1583
  <p><a href="#global_005ftraits_003aexam_005fpackages">exam_packages</a> で指定したソースコード検査パッ
1584
1584
  ケージ中のコードチェック機能で、実行を除外するものをメッセージの深刻度により指
@@ -1589,7 +1589,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1589
1589
  </td><td valign="top" width="10%">
1590
1590
  メッセージ ID と文字列のマップ
1591
1591
  </td><td valign="top" width="0%">
1592
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1592
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1593
1593
 
1594
1594
  <p><a href="#global_005ftraits_003aexam_005fpackages">exam_packages</a> で指定したソースコード検査パッ
1595
1595
  ケージ中のコードチェック機能で、実行を除外するものをメッセージ ID により指定し
@@ -1604,7 +1604,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="#Traits">Traits</a>
1604
1604
  </td><td valign="top" width="10%">
1605
1605
  メッセージ ID と文字列のマップ
1606
1606
  </td><td valign="top" width="0%">
1607
- <b>AdLint 2.4.0 では、この項目による設定は未サポートです。</b>
1607
+ <b>AdLint 2.4.6 では、この項目による設定は未サポートです。</b>
1608
1608
 
1609
1609
  <p><code>exclusion</code> セクションの設定内容により除外しましたが、メッセージ ID 指定で
1610
1610
  特定のコードチェック機能を含める場合に指定します。
@@ -2,7 +2,7 @@
2
2
  @setfilename users_guide_ja.info
3
3
  @documentlanguage ja
4
4
  @documentencoding utf-8
5
- @settitle AdLint 2.4.0 利用者ガイド
5
+ @settitle AdLint 2.4.6 利用者ガイド
6
6
 
7
7
  @copying
8
8
  Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
@@ -1464,7 +1464,7 @@ extension_substitution:
1464
1464
  @tab
1465
1465
  文字列の配列
1466
1466
  @tab
1467
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1467
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1468
1468
 
1469
1469
  ディレクトリパス名を指定した場合は、そのディレクトリ配下のソースコードについて
1470
1470
  のみ、警告メッセージを出力します。
@@ -1479,7 +1479,7 @@ extension_substitution:
1479
1479
  @tab
1480
1480
  文字列の配列
1481
1481
  @tab
1482
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1482
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1483
1483
 
1484
1484
  ディレクトリパス名を指定した場合は、そのディレクトリ配下のソースコードについて
1485
1485
  は、警告メッセージを抑止します。
@@ -1491,7 +1491,7 @@ extension_substitution:
1491
1491
  @tab
1492
1492
  真偽値
1493
1493
  @tab
1494
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1494
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1495
1495
 
1496
1496
  解析対象ソースコード内の注釈によるコードチェックの選択機能を有効化します。
1497
1497
 
@@ -1504,7 +1504,7 @@ extension_substitution:
1504
1504
  @tab
1505
1505
  文字列の配列
1506
1506
  @tab
1507
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1507
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1508
1508
 
1509
1509
  @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ
1510
1510
  ケージ中のコードチェック機能で、実行を除外するものをメッセージのカテゴリにより
@@ -1517,7 +1517,7 @@ extension_substitution:
1517
1517
  @tab
1518
1518
  正規表現を表す文字列
1519
1519
  @tab
1520
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1520
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1521
1521
 
1522
1522
  @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ
1523
1523
  ケージ中のコードチェック機能で、実行を除外するものをメッセージの深刻度により指
@@ -1530,7 +1530,7 @@ extension_substitution:
1530
1530
  @tab
1531
1531
  メッセージ ID と文字列のマップ
1532
1532
  @tab
1533
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1533
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1534
1534
 
1535
1535
  @ref{global_traits:exam_packages, exam_packages} で指定したソースコード検査パッ
1536
1536
  ケージ中のコードチェック機能で、実行を除外するものをメッセージ ID により指定し
@@ -1547,7 +1547,7 @@ extension_substitution:
1547
1547
  @tab
1548
1548
  メッセージ ID と文字列のマップ
1549
1549
  @tab
1550
- @b{AdLint 2.4.0 では、この項目による設定は未サポートです。}
1550
+ @b{AdLint 2.4.6 では、この項目による設定は未サポートです。}
1551
1551
 
1552
1552
  @code{exclusion} セクションの設定内容により除外しましたが、メッセージ ID 指定で
1553
1553
  特定のコードチェック機能を含める場合に指定します。
@@ -38,11 +38,58 @@ module C
38
38
  before(:all) { Traits.instance.read_from($default_traits) }
39
39
 
40
40
  let(:type_table) { TypeTable.new }
41
- let(:int_ptr) { pointer_type(int_type) }
42
- let(:const_int_ptr) { pointer_type(qualified_type(int_type, :const)) }
43
- let(:const_int) { qualified_type(int_type, :const) }
44
- let(:volatile_int) { qualified_type(int_type, :volatile) }
45
- let(:const_volatile_int) { qualified_type(int_type, :const, :volatile) }
41
+
42
+ let(:int_ptr) {
43
+ pointer_type(int_type)
44
+ }
45
+
46
+ let(:const_int_ptr) {
47
+ pointer_type(qualified_type(int_type, :const))
48
+ }
49
+
50
+ let(:const_int) {
51
+ qualified_type(int_type, :const)
52
+ }
53
+
54
+ let(:volatile_int) {
55
+ qualified_type(int_type, :volatile)
56
+ }
57
+
58
+ let(:const_volatile_int) {
59
+ qualified_type(int_type, :const, :volatile)
60
+ }
61
+
62
+ let(:const_char) {
63
+ qualified_type(char_type, :const)
64
+ }
65
+
66
+ let(:const_unsigned_char) {
67
+ qualified_type(unsigned_char_type, :const)
68
+ }
69
+
70
+ let(:char) {
71
+ char_type
72
+ }
73
+
74
+ let(:char_ptr) {
75
+ pointer_type(char_type)
76
+ }
77
+
78
+ let(:const_char_ptr) {
79
+ pointer_type(qualified_type(char_type, :const))
80
+ }
81
+
82
+ let(:unsigned_char) {
83
+ unsigned_char_type
84
+ }
85
+
86
+ let(:const_unsigned_char_ptr) {
87
+ pointer_type(qualified_type(unsigned_char_type, :const))
88
+ }
89
+
90
+ let(:signed_char) {
91
+ signed_char_type
92
+ }
46
93
 
47
94
  describe ArrayType do
48
95
  context "`int[3]'" do
@@ -128,6 +175,58 @@ module C
128
175
  end
129
176
  end
130
177
 
178
+ describe QualifiedType do
179
+ context "`const char'" do
180
+ subject { const_char }
181
+
182
+ it "should be equal to `const unsigned char'" do
183
+ should == const_unsigned_char
184
+ end
185
+
186
+ it "should be convertible to `char'" do
187
+ should be_convertible(char)
188
+ end
189
+
190
+ it "should be convertible to `const unsigned char'" do
191
+ should be_convertible(const_unsigned_char)
192
+ end
193
+ end
194
+
195
+ context "`char'" do
196
+ subject { char }
197
+
198
+ it "should be convertible to `const char'" do
199
+ should be_convertible(const_char)
200
+ end
201
+ end
202
+
203
+ context "`const char *'" do
204
+ subject { const_char_ptr }
205
+
206
+ it "should be convertible to `const unsigned char *'" do
207
+ should be_convertible(const_unsigned_char_ptr)
208
+ end
209
+
210
+ it "should not be convertible to `char *'" do
211
+ should_not be_convertible(char_ptr)
212
+ end
213
+ end
214
+ end
215
+
216
+ describe CharType do
217
+ context "`char'" do
218
+ subject { char }
219
+
220
+ it "should be equal to `unsigned char'" do
221
+ should == unsigned_char
222
+ end
223
+
224
+ it "should not be equal to `signed char'" do
225
+ should_not == signed_char
226
+ end
227
+ end
228
+ end
229
+
131
230
  include TypeTableMediator
132
231
  end
133
232
 
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: 2.4.0
4
+ version: 2.4.6
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: 2012-09-21 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'AdLint is a source code static analyzer.
15
15
 
@@ -230,6 +230,7 @@ files:
230
230
  - features/code_check/W0573.feature
231
231
  - features/code_check/W0583.feature
232
232
  - features/code_check/W0606.feature
233
+ - features/code_check/W0635.feature
233
234
  - features/code_check/W0641.feature
234
235
  - features/code_check/W0643.feature
235
236
  - features/code_check/W0644.feature