Skip to content

Commit 95341e5

Browse files
committed
Correct invalid KP messages
1 parent 14a83ed commit 95341e5

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lkql_checker/share/lkql/kp/kp_19915.lkql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@check(help="occurrence of KP 19915",
2-
message="occurrence of KP 19915")
1+
@check(help="possible occurrence of KP 19915",
2+
message="possible occurrence of KP 19915")
33
fun kp_19915(node) =
44
|" Search for `'Class'Max_Size_In_Storage_Elements`.
55
node is AttributeRef(f_prefix: prefix@AttributeRef)

lkql_checker/share/lkql/kp/kp_20023.lkql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ fun is_class_subtype(type_expr) =
88
| a@AttributeRef => a.f_attribute.p_name_is("class")
99
| i@Identifier => i.p_referenced_decl() is BaseSubtypeDecl(p_get_type(): ClasswideTypeDecl)
1010

11-
@check(help="occurrence of KP 20023",
12-
message="occurrence of KP 20023")
11+
@check(help="possible occurrence of KP 20023",
12+
message="possible occurrence of KP 20023")
1313
fun kp_20023(node) =
1414
|" Flag object assignments to class-wide type objects where the right hand
1515
|" side is a conditional expression containing function calls that dispatch
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
main.adb:8:27: rule violation: occurrence of KP 19915
1+
main.adb:8:27: rule violation: possible occurrence of KP 19915
22
8 | Size : Long_Integer := T'Class'Max_Size_In_Storage_Elements; -- FLAG
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
main.adb:31:4: rule violation: occurrence of KP 20023
1+
main.adb:31:4: rule violation: possible occurrence of KP 20023
22
31 | X := (if Cond then Make_Dispatch else Make); -- FLAG
33
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5-
main.adb:32:4: rule violation: occurrence of KP 20023
5+
main.adb:32:4: rule violation: possible occurrence of KP 20023
66
32 | X := (if Cond then Make else Make_Dispatch); -- FLAG
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88

9-
main.adb:33:4: rule violation: occurrence of KP 20023
9+
main.adb:33:4: rule violation: possible occurrence of KP 20023
1010
33 | X := ((((if Cond then Make_Dispatch else Make)))); -- FLAG
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
main.adb:34:4: rule violation: occurrence of KP 20023
13+
main.adb:34:4: rule violation: possible occurrence of KP 20023
1414
34 | X := -- FLAG
1515
| ____^
1616
||
@@ -19,11 +19,11 @@ main.adb:34:4: rule violation: occurrence of KP 20023
1919
37 || when False => Make);
2020
||____________________________^
2121

22-
main.adb:38:4: rule violation: occurrence of KP 20023
22+
main.adb:38:4: rule violation: possible occurrence of KP 20023
2323
38 | Y := (if Cond then Make_Dispatch else Make); -- FLAG
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2525

26-
main.adb:39:4: rule violation: occurrence of KP 20023
26+
main.adb:39:4: rule violation: possible occurrence of KP 20023
2727
39 | Z := (if Cond then Make_Dispatch else Make); -- FLAG
2828
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2929

testsuite/tests/gnatcheck/xml_help/test.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ testsuite_driver: No output file generated by gnatcheck
9494
<check switch="+Rkp_19824" label="possible occurrence of KP 19824"/>
9595
<check switch="+Rkp_19853" label="possible occurrence of KP 19853"/>
9696
<check switch="+Rkp_19901" label="possible occurrence of KP 19901"/>
97-
<check switch="+Rkp_19915" label="occurrence of KP 19915"/>
97+
<check switch="+Rkp_19915" label="possible occurrence of KP 19915"/>
9898
<check switch="+Rkp_19997" label="possible occurrence of KP 19997"/>
99-
<check switch="+Rkp_20023" label="occurrence of KP 20023"/>
99+
<check switch="+Rkp_20023" label="possible occurrence of KP 20023"/>
100100
<check switch="+Rkp_ob03_009" label="possible occurrence of KP OB03-009"/>
101101
<check switch="+Rkp_p226_024" label="possible occurrence of KP P226-024 - global analysis required"/>
102102
<check switch="+Rkp_q309_014" label="possible occurrence of KP Q309-014"/>
@@ -616,9 +616,9 @@ testsuite_driver: No output file generated by gnatcheck
616616
<check switch="+Rkp_19824" label="possible occurrence of KP 19824"/>
617617
<check switch="+Rkp_19853" label="possible occurrence of KP 19853"/>
618618
<check switch="+Rkp_19901" label="possible occurrence of KP 19901"/>
619-
<check switch="+Rkp_19915" label="occurrence of KP 19915"/>
619+
<check switch="+Rkp_19915" label="possible occurrence of KP 19915"/>
620620
<check switch="+Rkp_19997" label="possible occurrence of KP 19997"/>
621-
<check switch="+Rkp_20023" label="occurrence of KP 20023"/>
621+
<check switch="+Rkp_20023" label="possible occurrence of KP 20023"/>
622622
<check switch="+Rkp_ob03_009" label="possible occurrence of KP OB03-009"/>
623623
<check switch="+Rkp_p226_024" label="possible occurrence of KP P226-024 - global analysis required"/>
624624
<check switch="+Rkp_q309_014" label="possible occurrence of KP Q309-014"/>

0 commit comments

Comments
 (0)