@@ -11,26 +11,31 @@ selector defining_names
11
11
| BasicDecl => *(this.p_defining_names())
12
12
| * => ()
13
13
14
+ fun has_aspect(node, aspect) = {
15
+ val a = node.p_get_aspect(aspect);
16
+ a.exists and not a.inherited
17
+ }
18
+
14
19
fun has_rep_aspect(node) =
15
- node.p_has_aspect( "Address") or
16
- node.p_has_aspect( "Alignment") or
17
- node.p_has_aspect( "Size") or
18
- node.p_has_aspect( "Component_Size") or
19
- node.p_has_aspect( "External_Tag") or
20
- node.p_has_aspect( "Asynchronous") or
21
- node.p_has_aspect( "Convention") or
22
- node.p_has_aspect( "Import") or
23
- node.p_has_aspect( "Export") or
24
- node.p_has_aspect( "No_Return") or
25
- node.p_has_aspect( "Atomic") or
26
- node.p_has_aspect( "Atomic_Components") or
27
- node.p_has_aspect( "Discard_Names") or
28
- node.p_has_aspect( "Independent") or
29
- node.p_has_aspect( "Independent_Components") or
30
- node.p_has_aspect( "Pack") or
31
- node.p_has_aspect( "Unchecked_Union") or
32
- node.p_has_aspect( "Volatile") or
33
- node.p_has_aspect( "Volatile_Components")
20
+ has_aspect(node, "Address") or
21
+ has_aspect(node, "Alignment") or
22
+ has_aspect(node, "Size") or
23
+ has_aspect(node, "Component_Size") or
24
+ has_aspect(node, "External_Tag") or
25
+ has_aspect(node, "Asynchronous") or
26
+ has_aspect(node, "Convention") or
27
+ has_aspect(node, "Import") or
28
+ has_aspect(node, "Export") or
29
+ has_aspect(node, "No_Return") or
30
+ has_aspect(node, "Atomic") or
31
+ has_aspect(node, "Atomic_Components") or
32
+ has_aspect(node, "Discard_Names") or
33
+ has_aspect(node, "Independent") or
34
+ has_aspect(node, "Independent_Components") or
35
+ has_aspect(node, "Pack") or
36
+ has_aspect(node, "Unchecked_Union") or
37
+ has_aspect(node, "Volatile") or
38
+ has_aspect(node, "Volatile_Components")
34
39
35
40
@unit_check(help="representation specification", category="Feature")
36
41
fun representation_specifications(unit, record_rep_clauses_only=false) = [
0 commit comments