Skip to content

Commit 40f2fa9

Browse files
committed
Merge branch 'topic/84' into 'master'
Fetch gnat-kp impact data from impact-db See merge request eng/libadalang/langkit-query-language!337
2 parents 4efe908 + 62200c7 commit 40f2fa9

File tree

101 files changed

+317
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+317
-169
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PYTHON=python
1313
MAVEN=mvn
1414
BUILD_DIR=/undefined
1515
LKQL_DIR=$(BUILD_DIR)/lkql
16+
IMPACTDB_DIR=/undefined
1617
GPRBUILD=gprbuild -j$(PROCS) -p -XBUILD_MODE=$(BUILD_MODE)
1718
GPRINSTALL=gprinstall --prefix=$(PREFIX) -p -XBUILD_MODE=$(BUILD_MODE)
1819
BUILD_FOR_JIT=false
@@ -36,6 +37,9 @@ doc: build_lkql_native_jit
3637
cd user_manual && make clean html
3738
cd lkql_checker/doc && make generate html-all
3839

40+
impacts:
41+
PYTHONPATH=$(IMPACTDB_DIR) ./utils/impact-db_impacts_gen.py $(IMPACTDB_DIR)
42+
3943
format:
4044
$(MAVEN) -f lkql_jit spotless:apply
4145

lkql_checker/share/lkql/kp/KP-18614.lkql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fun multiple_of(v, multiple) = v / multiple * multiple == v
44

55
@check(help="possible occurrence of KP 18614",
66
message="possible occurrence of KP 18614 if compiled with optimization",
7-
impact="2[0-3].*", target="powerpc*,leon*,sparc*")
7+
target="powerpc*,leon*,sparc*")
88
fun kp_18614(node) =
99
node is Aggregate(p_expression_type():
1010
t@BaseTypeDecl(p_is_array_type(): true)

lkql_checker/share/lkql/kp/KP-18636.lkql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flag 'Image applied to objects of a class-wide interface type
22

3-
@check(message="possible occurrence of KP 18636", impact="22.*,23.*")
3+
@check(message="possible occurrence of KP 18636")
44
fun kp_18636(node) =
55
node is AttributeRef
66
when node.f_attribute.p_name_is("Image")

lkql_checker/share/lkql/kp/KP-18637.lkql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import stdlib
55

6-
@check(message="possible occurrence of KP 18637", impact="23.*")
6+
@check(message="possible occurrence of KP 18637")
77
fun kp_18637(node) =
88
node is CallExpr(
99
f_name: Name(

lkql_checker/share/lkql/kp/KP-18701.lkql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import stdlib
55

6-
@check(message="possible occurrence of KP 18701", impact="23.*")
6+
@check(message="possible occurrence of KP 18701")
77
fun kp_18701(node) =
88
node is Aggregate
99
when node.p_expression_type() is BaseTypeDecl(

lkql_checker/share/lkql/kp/KP-18718.lkql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# variant part
55

66
@check(help="possible occurrence of KP 18718",
7-
message="possible occurrence of KP 18718 if compiled with optimization",
8-
impact="23.*")
7+
message="possible occurrence of KP 18718 if compiled with optimization")
98
fun kp_18718(node) =
109
node is ObjectDecl(
1110
# An ObjectDecl with a default expression being a function call

lkql_checker/share/lkql/kp/KP-18801.lkql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ fun check_params(n) = {
4545
}
4646

4747
@check(help="possible occurrence of KP 18801",
48-
message="possible occurrence of KP 18801",
49-
impact="23.*")
48+
message="possible occurrence of KP 18801")
5049
fun kp_18801(node) =
5150
node is (BinOp(f_op: OpEq) |
5251
CallExpr(p_kind(): "call") when node.f_name.p_name_is("\"=\""))

lkql_checker/share/lkql/kp/KP-18926.lkql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ fun is_flagged_aspect(aspect) =
2020
| * => false
2121

2222
@check(help="possible occurrence of KP 18926",
23-
message="possible occurrence of KP 18926",
24-
impact="23.*,24.1")
23+
message="possible occurrence of KP 18926")
2524
fun kp_18926(node) =
2625
node is BracketAggregate
2726
when is_flagged_aspect(node.p_expression_type().p_get_aspect("Aggregate"))

lkql_checker/share/lkql/kp/KP-19038.lkql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@check(help="possible occurrence of KP 19038",
2-
message="possible occurrence of KP 19038",
3-
impact="24.1")
2+
message="possible occurrence of KP 19038")
43
fun kp_19038(node) =
54
|" Detect all occurrences of aspect "Exclusive_Functions".
65
node is AspectAssoc(

lkql_checker/share/lkql/kp/KP-19134.lkql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ fun is_unck_conv_to_array_of_int(call) =
2626
}
2727

2828
@check(help="possible occurrence of KP 19134",
29-
message="possible occurrence of KP 19134",
30-
impact="23.*,24.*")
29+
message="possible occurrence of KP 19134")
3130
fun kp_19134(node) =
3231
node is CallExpr(p_is_call(): true)
3332
when stdlib.any([is_unck_conv_to_array_of_int(p.actual)

0 commit comments

Comments
 (0)