Skip to content

Commit 1f88d62

Browse files
committed
Merge branch 'mr/thevenoux/libadalang#1642' into 'master'
Fix rules after Libadalang update See merge request eng/libadalang/langkit-query-language!603
2 parents 84004fb + 3476acf commit 1f88d62

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
fun indexed_function_result_has_nonstatic_size(subprogram) = {
2-
# To determine if a function is indexed, check that its return
3-
# type has the Constant_Indexing user-defined aspect.
4-
val returns = subprogram.f_subp_spec.p_returns();
1+
fun indexed_function_result_has_nonstatic_size(subprogram_spec) = {
2+
# Check that indexed function's return type has the Constant_Indexing
3+
# user-defined aspect.
4+
val returns = subprogram_spec.p_returns();
55
match returns.p_designated_type_decl()
66
| t@BaseTypeDecl => t.p_has_aspect("Constant_Indexing")
77
and not returns.p_is_statically_constrained()
@@ -15,8 +15,8 @@ fun kp_19625(node) =
1515
# function call when the indexed function result has a nonstatic size.
1616
node is CallExpr(
1717
f_name: CallExpr(p_is_call(): true),
18-
p_kind(): "array_index"
18+
p_kind(): "generalized_indexing"
1919
)
2020
when indexed_function_result_has_nonstatic_size(
21-
node.f_name.p_referenced_decl()
21+
node.f_name.p_called_subp_spec()
2222
)

lkql_checker/share/lkql/positional_parameters.lkql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ fun positional_parameters(node, all=false) =
8585
node is ParamAssoc(f_designator: null, parent: l@AssocList)
8686
when l.parent is c@CallExpr(
8787
p_is_call(): true,
88+
p_kind(): not "generalized_indexing",
8889
f_name: not AttributeRef,
8990
f_name: id@*(p_is_operator_name(): false) when (
9091
all or should_be_named(node, c, id.p_is_dot_call())

0 commit comments

Comments
 (0)