2 * SPDX-License-Identifier: MIT
4 * Copyright 2010 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
6 * Common Trace Format Metadata Semantic Validator.
11 #define BT_COMP_LOG_SELF_COMP (log_cfg->self_comp)
12 #define BT_LOG_OUTPUT_LEVEL (log_cfg->log_level)
13 #define BT_LOG_TAG "PLUGIN/CTF/META/SEMANTIC-VALIDATOR-VISITOR"
14 #include "logging.hpp"
16 #include "common/list.h"
20 #define _bt_list_first_entry(ptr, type, member) bt_list_entry((ptr)->next, type, member)
22 static int _ctf_visitor_semantic_check(int depth
, struct ctf_node
*node
,
23 struct meta_log_config
*log_cfg
);
25 static int ctf_visitor_unary_expression(int, struct ctf_node
*node
, struct meta_log_config
*log_cfg
)
27 struct ctf_node
*iter
;
28 int is_ctf_exp
= 0, is_ctf_exp_left
= 0;
30 switch (node
->parent
->type
) {
31 case NODE_CTF_EXPRESSION
:
33 bt_list_for_each_entry (iter
, &node
->parent
->u
.ctf_expression
.left
, siblings
) {
37 * We are a left child of a ctf expression.
38 * We are only allowed to be a string.
40 if (node
->u
.unary_expression
.type
!= UNARY_STRING
) {
41 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
43 "Left child of a CTF expression is only allowed to be a string.");
49 /* Right child of a ctf expression can be any type of unary exp. */
51 case NODE_TYPE_DECLARATOR
:
53 * We are the length of a type declarator.
55 switch (node
->u
.unary_expression
.type
) {
56 case UNARY_UNSIGNED_CONSTANT
:
60 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
62 "Children of field class declarator and `enum` can only be unsigned numeric constants or references to fields (e.g., `a.b.c`).");
69 * We are the size of a struct align attribute.
71 switch (node
->u
.unary_expression
.type
) {
72 case UNARY_UNSIGNED_CONSTANT
:
75 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
77 "Structure alignment attribute can only be an unsigned numeric constant.");
83 /* The enumerator's parent has validated its validity already. */
86 case NODE_UNARY_EXPRESSION
:
88 * We disallow nested unary expressions and "sbrac" unary
91 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
92 "Nested unary expressions not allowed (`()` and `[]`).");
103 case NODE_TYPEALIAS_TARGET
:
104 case NODE_TYPEALIAS_ALIAS
:
106 case NODE_TYPE_SPECIFIER
:
108 case NODE_FLOATING_POINT
:
112 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
118 switch (node
->u
.unary_expression
.link
) {
119 case UNARY_LINK_UNKNOWN
:
120 /* We don't allow empty link except on the first node of the list */
122 _bt_list_first_entry(is_ctf_exp_left
? &node
->parent
->u
.ctf_expression
.left
:
123 &node
->parent
->u
.ctf_expression
.right
,
124 struct ctf_node
, siblings
) != node
) {
125 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
127 "Empty link is not allowed except on first node of unary expression (need to separate nodes with `.` or `->`).");
132 case UNARY_ARROWLINK
:
133 /* We only allow -> and . links between children of ctf_expression. */
134 if (node
->parent
->type
!= NODE_CTF_EXPRESSION
) {
135 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
136 node
->lineno
, "Links `.` and `->` are only allowed as children of CTF expression.");
140 * Only strings can be separated linked by . or ->.
141 * This includes "", '' and non-quoted identifiers.
143 if (node
->u
.unary_expression
.type
!= UNARY_STRING
) {
144 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
146 "Links `.` and `->` are only allowed to separate strings and identifiers.");
149 /* We don't allow link on the first node of the list */
151 _bt_list_first_entry(is_ctf_exp_left
? &node
->parent
->u
.ctf_expression
.left
:
152 &node
->parent
->u
.ctf_expression
.right
,
153 struct ctf_node
, siblings
) == node
) {
154 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
156 "Links `.` and `->` are not allowed before first node of the unary expression list.");
160 case UNARY_DOTDOTDOT
:
161 /* We only allow ... link between children of enumerator. */
162 if (node
->parent
->type
!= NODE_ENUMERATOR
) {
163 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
164 "Link `...` is only allowed within enumerator.");
167 /* We don't allow link on the first node of the list */
168 if (_bt_list_first_entry(&node
->parent
->u
.enumerator
.values
, struct ctf_node
, siblings
) ==
170 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
172 "Link `...` is not allowed on the first node of the unary expression list.");
177 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
, "Unknown expression link type: type=%d",
178 node
->u
.unary_expression
.link
);
184 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
185 node
->lineno
, "Incoherent parent node's type: node-type=%s, parent-node-type=%s",
186 node_type(node
), node_type(node
->parent
));
187 return -EINVAL
; /* Incoherent structure */
190 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
191 "Semantic error: node-type=%s, parent-node-type=%s",
192 node_type(node
), node_type(node
->parent
));
193 return -EPERM
; /* Structure not allowed */
196 static int ctf_visitor_field_class_specifier_list(int, struct ctf_node
*node
,
197 struct meta_log_config
*log_cfg
)
199 switch (node
->parent
->type
) {
200 case NODE_CTF_EXPRESSION
:
201 case NODE_TYPE_DECLARATOR
:
203 case NODE_TYPEALIAS_TARGET
:
204 case NODE_TYPEALIAS_ALIAS
:
206 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
216 case NODE_UNARY_EXPRESSION
:
218 case NODE_TYPE_SPECIFIER
:
219 case NODE_TYPE_SPECIFIER_LIST
:
221 case NODE_FLOATING_POINT
:
224 case NODE_ENUMERATOR
:
232 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
233 node
->lineno
, "Incoherent parent node's type: node-type=%s, parent-node-type=%s",
234 node_type(node
), node_type(node
->parent
));
235 return -EINVAL
; /* Incoherent structure */
238 static int ctf_visitor_field_class_specifier(int, struct ctf_node
*node
,
239 struct meta_log_config
*log_cfg
)
241 switch (node
->parent
->type
) {
242 case NODE_TYPE_SPECIFIER_LIST
:
245 case NODE_CTF_EXPRESSION
:
246 case NODE_TYPE_DECLARATOR
:
248 case NODE_TYPEALIAS_TARGET
:
249 case NODE_TYPEALIAS_ALIAS
:
251 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
259 case NODE_UNARY_EXPRESSION
:
261 case NODE_TYPE_SPECIFIER
:
263 case NODE_FLOATING_POINT
:
266 case NODE_ENUMERATOR
:
274 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
275 node
->lineno
, "Incoherent parent node's type: node-type=%s, parent-node-type=%s",
276 node_type(node
), node_type(node
->parent
));
277 return -EINVAL
; /* Incoherent structure */
280 static int ctf_visitor_field_class_declarator(int depth
, struct ctf_node
*node
,
281 struct meta_log_config
*log_cfg
)
284 struct ctf_node
*iter
;
288 switch (node
->parent
->type
) {
289 case NODE_TYPE_DECLARATOR
:
291 * A nested field class declarator is not allowed to
294 if (!bt_list_empty(&node
->u
.field_class_declarator
.pointers
))
297 case NODE_TYPEALIAS_TARGET
:
299 case NODE_TYPEALIAS_ALIAS
:
301 * Only accept alias name containing:
303 * - identifier * (any number of pointers)
304 * NOT accepting alias names containing [] (would otherwise
305 * cause semantic clash for later declarations of
306 * arrays/sequences of elements, where elements could be
307 * arrays/sequences themselves (if allowed in field class alias).
308 * NOT accepting alias with identifier. The declarator should
309 * be either empty or contain pointer(s).
311 if (node
->u
.field_class_declarator
.type
== TYPEDEC_NESTED
)
313 bt_list_for_each_entry (iter
,
314 &node
->parent
->u
.field_class_alias_name
.field_class_specifier_list
315 ->u
.field_class_specifier_list
.head
,
317 switch (iter
->u
.field_class_specifier
.type
) {
318 case TYPESPEC_FLOATING_POINT
:
319 case TYPESPEC_INTEGER
:
320 case TYPESPEC_STRING
:
321 case TYPESPEC_STRUCT
:
322 case TYPESPEC_VARIANT
:
324 if (bt_list_empty(&node
->u
.field_class_declarator
.pointers
))
331 if (node
->u
.field_class_declarator
.type
== TYPEDEC_ID
&&
332 node
->u
.field_class_declarator
.u
.id
)
336 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
346 case NODE_CTF_EXPRESSION
:
347 case NODE_UNARY_EXPRESSION
:
349 case NODE_TYPE_SPECIFIER
:
351 case NODE_FLOATING_POINT
:
354 case NODE_ENUMERATOR
:
362 bt_list_for_each_entry (iter
, &node
->u
.field_class_declarator
.pointers
, siblings
) {
363 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
368 switch (node
->u
.field_class_declarator
.type
) {
373 if (node
->u
.field_class_declarator
.u
.nested
.field_class_declarator
) {
374 ret
= _ctf_visitor_semantic_check(
375 depth
+ 1, node
->u
.field_class_declarator
.u
.nested
.field_class_declarator
, log_cfg
);
379 if (!node
->u
.field_class_declarator
.u
.nested
.abstract_array
) {
380 bt_list_for_each_entry (iter
, &node
->u
.field_class_declarator
.u
.nested
.length
,
382 if (iter
->type
!= NODE_UNARY_EXPRESSION
) {
383 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
384 node
->lineno
, "Expecting unary expression as length: node-type=%s",
388 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
393 if (node
->parent
->type
== NODE_TYPEALIAS_TARGET
) {
394 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
396 "Abstract array declarator not permitted as target of field class alias.");
400 if (node
->u
.field_class_declarator
.bitfield_len
) {
401 ret
= _ctf_visitor_semantic_check(depth
+ 1,
402 node
->u
.field_class_declarator
.bitfield_len
, log_cfg
);
408 case TYPEDEC_UNKNOWN
:
410 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
, "Unknown field class declarator: type=%d",
411 node
->u
.field_class_declarator
.type
);
418 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
419 node
->lineno
, "Incoherent parent node's type: node-type=%s, parent-node-type=%s",
420 node_type(node
), node_type(node
->parent
));
421 return -EINVAL
; /* Incoherent structure */
424 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
425 "Semantic error: node-type=%s, parent-node-type=%s",
426 node_type(node
), node_type(node
->parent
));
427 return -EPERM
; /* Structure not allowed */
430 static int _ctf_visitor_semantic_check(int depth
, struct ctf_node
*node
,
431 struct meta_log_config
*log_cfg
)
434 struct ctf_node
*iter
;
439 switch (node
->type
) {
441 bt_list_for_each_entry (iter
, &node
->u
.root
.declaration_list
, siblings
) {
442 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
446 bt_list_for_each_entry (iter
, &node
->u
.root
.trace
, siblings
) {
447 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
451 bt_list_for_each_entry (iter
, &node
->u
.root
.stream
, siblings
) {
452 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
456 bt_list_for_each_entry (iter
, &node
->u
.root
.event
, siblings
) {
457 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
464 switch (node
->parent
->type
) {
471 bt_list_for_each_entry (iter
, &node
->u
.event
.declaration_list
, siblings
) {
472 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
478 switch (node
->parent
->type
) {
485 bt_list_for_each_entry (iter
, &node
->u
.stream
.declaration_list
, siblings
) {
486 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
492 switch (node
->parent
->type
) {
499 bt_list_for_each_entry (iter
, &node
->u
.env
.declaration_list
, siblings
) {
500 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
506 switch (node
->parent
->type
) {
513 bt_list_for_each_entry (iter
, &node
->u
.trace
.declaration_list
, siblings
) {
514 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
520 switch (node
->parent
->type
) {
527 bt_list_for_each_entry (iter
, &node
->u
.clock
.declaration_list
, siblings
) {
528 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
534 switch (node
->parent
->type
) {
541 bt_list_for_each_entry (iter
, &node
->u
.callsite
.declaration_list
, siblings
) {
542 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
548 case NODE_CTF_EXPRESSION
:
549 switch (node
->parent
->type
) {
557 case NODE_FLOATING_POINT
:
562 case NODE_CTF_EXPRESSION
:
563 case NODE_UNARY_EXPRESSION
:
565 case NODE_TYPEALIAS_TARGET
:
566 case NODE_TYPEALIAS_ALIAS
:
567 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
569 case NODE_TYPE_SPECIFIER
:
570 case NODE_TYPE_SPECIFIER_LIST
:
572 case NODE_TYPE_DECLARATOR
:
573 case NODE_ENUMERATOR
:
582 bt_list_for_each_entry (iter
, &node
->u
.ctf_expression
.left
, siblings
) {
583 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
587 bt_list_for_each_entry (iter
, &node
->u
.ctf_expression
.right
, siblings
) {
588 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
594 case NODE_UNARY_EXPRESSION
:
595 return ctf_visitor_unary_expression(depth
, node
, log_cfg
);
598 switch (node
->parent
->type
) {
607 case NODE_CTF_EXPRESSION
:
608 case NODE_UNARY_EXPRESSION
:
610 case NODE_TYPEALIAS_TARGET
:
611 case NODE_TYPEALIAS_ALIAS
:
613 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
614 case NODE_TYPE_SPECIFIER
:
615 case NODE_TYPE_SPECIFIER_LIST
:
617 case NODE_TYPE_DECLARATOR
:
618 case NODE_FLOATING_POINT
:
621 case NODE_ENUMERATOR
:
631 ret
= _ctf_visitor_semantic_check(
632 depth
+ 1, node
->u
.field_class_def
.field_class_specifier_list
, log_cfg
);
635 bt_list_for_each_entry (iter
, &node
->u
.field_class_def
.field_class_declarators
, siblings
) {
636 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
642 case NODE_TYPEALIAS_TARGET
:
646 switch (node
->parent
->type
) {
654 ret
= _ctf_visitor_semantic_check(
655 depth
+ 1, node
->u
.field_class_alias_target
.field_class_specifier_list
, log_cfg
);
659 bt_list_for_each_entry (iter
, &node
->u
.field_class_alias_target
.field_class_declarators
,
661 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
666 if (nr_declarators
> 1) {
667 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
669 "Too many declarators in field class alias's name (maximum is 1): count=%d",
676 case NODE_TYPEALIAS_ALIAS
:
680 switch (node
->parent
->type
) {
688 ret
= _ctf_visitor_semantic_check(
689 depth
+ 1, node
->u
.field_class_alias_name
.field_class_specifier_list
, log_cfg
);
693 bt_list_for_each_entry (iter
, &node
->u
.field_class_alias_name
.field_class_declarators
,
695 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
700 if (nr_declarators
> 1) {
701 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
703 "Too many declarators in field class alias's name (maximum is 1): count=%d",
711 switch (node
->parent
->type
) {
720 case NODE_CTF_EXPRESSION
:
721 case NODE_UNARY_EXPRESSION
:
723 case NODE_TYPEALIAS_TARGET
:
724 case NODE_TYPEALIAS_ALIAS
:
726 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
727 case NODE_TYPE_SPECIFIER
:
728 case NODE_TYPE_SPECIFIER_LIST
:
730 case NODE_TYPE_DECLARATOR
:
731 case NODE_FLOATING_POINT
:
734 case NODE_ENUMERATOR
:
743 ret
= _ctf_visitor_semantic_check(depth
+ 1, node
->u
.field_class_alias
.target
, log_cfg
);
746 ret
= _ctf_visitor_semantic_check(depth
+ 1, node
->u
.field_class_alias
.alias
, log_cfg
);
751 case NODE_TYPE_SPECIFIER_LIST
:
752 ret
= ctf_visitor_field_class_specifier_list(depth
, node
, log_cfg
);
756 case NODE_TYPE_SPECIFIER
:
757 ret
= ctf_visitor_field_class_specifier(depth
, node
, log_cfg
);
762 switch (node
->parent
->type
) {
763 case NODE_TYPE_DECLARATOR
:
769 case NODE_TYPE_DECLARATOR
:
770 ret
= ctf_visitor_field_class_declarator(depth
, node
, log_cfg
);
775 case NODE_FLOATING_POINT
:
776 switch (node
->parent
->type
) {
777 case NODE_TYPE_SPECIFIER
:
782 case NODE_UNARY_EXPRESSION
:
785 bt_list_for_each_entry (iter
, &node
->u
.floating_point
.expressions
, siblings
) {
786 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
792 switch (node
->parent
->type
) {
793 case NODE_TYPE_SPECIFIER
:
799 bt_list_for_each_entry (iter
, &node
->u
.integer
.expressions
, siblings
) {
800 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
806 switch (node
->parent
->type
) {
807 case NODE_TYPE_SPECIFIER
:
812 case NODE_UNARY_EXPRESSION
:
816 bt_list_for_each_entry (iter
, &node
->u
.string
.expressions
, siblings
) {
817 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
822 case NODE_ENUMERATOR
:
823 switch (node
->parent
->type
) {
830 * Enumerators are only allows to contain:
831 * numeric unary expression
832 * or num. unary exp. ... num. unary exp
837 bt_list_for_each_entry (iter
, &node
->u
.enumerator
.values
, siblings
) {
840 if (iter
->type
!= NODE_UNARY_EXPRESSION
||
841 (iter
->u
.unary_expression
.type
!= UNARY_SIGNED_CONSTANT
&&
842 iter
->u
.unary_expression
.type
!= UNARY_UNSIGNED_CONSTANT
) ||
843 iter
->u
.unary_expression
.link
!= UNARY_LINK_UNKNOWN
) {
844 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
845 iter
->lineno
, "First unary expression of enumerator is unexpected.");
850 if (iter
->type
!= NODE_UNARY_EXPRESSION
||
851 (iter
->u
.unary_expression
.type
!= UNARY_SIGNED_CONSTANT
&&
852 iter
->u
.unary_expression
.type
!= UNARY_UNSIGNED_CONSTANT
) ||
853 iter
->u
.unary_expression
.link
!= UNARY_DOTDOTDOT
) {
854 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
855 iter
->lineno
, "Second unary expression of enumerator is unexpected.");
865 bt_list_for_each_entry (iter
, &node
->u
.enumerator
.values
, siblings
) {
866 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
872 switch (node
->parent
->type
) {
873 case NODE_TYPE_SPECIFIER
:
878 case NODE_UNARY_EXPRESSION
:
883 ret
= _ctf_visitor_semantic_check(depth
+ 1, node
->u
._enum
.container_field_class
, log_cfg
);
887 bt_list_for_each_entry (iter
, &node
->u
._enum
.enumerator_list
, siblings
) {
888 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
894 case NODE_STRUCT_OR_VARIANT_DECLARATION
:
895 switch (node
->parent
->type
) {
902 ret
= _ctf_visitor_semantic_check(
903 depth
+ 1, node
->u
.struct_or_variant_declaration
.field_class_specifier_list
, log_cfg
);
906 bt_list_for_each_entry (
907 iter
, &node
->u
.struct_or_variant_declaration
.field_class_declarators
, siblings
) {
908 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
914 switch (node
->parent
->type
) {
915 case NODE_TYPE_SPECIFIER
:
920 case NODE_UNARY_EXPRESSION
:
923 bt_list_for_each_entry (iter
, &node
->u
.variant
.declaration_list
, siblings
) {
924 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
931 switch (node
->parent
->type
) {
932 case NODE_TYPE_SPECIFIER
:
937 case NODE_UNARY_EXPRESSION
:
940 bt_list_for_each_entry (iter
, &node
->u
._struct
.declaration_list
, siblings
) {
941 ret
= _ctf_visitor_semantic_check(depth
+ 1, iter
, log_cfg
);
949 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
, "Unknown node type: type=%d", node
->type
);
955 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(
956 node
->lineno
, "Incoherent parent node's type: node-type=%s, parent-node-type=%s",
957 node_type(node
), node_type(node
->parent
));
958 return -EINVAL
; /* Incoherent structure */
961 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
962 "Semantic error: node-type=%s, parent-node-type=%s",
963 node_type(node
), node_type(node
->parent
));
964 return -EPERM
; /* Structure not allowed */
967 int ctf_visitor_semantic_check(int depth
, struct ctf_node
*node
, struct meta_log_config
*log_cfg
)
972 * First make sure we create the parent links for all children. Let's
973 * take the safe route and recreate them at each validation, just in
974 * case the structure has changed.
976 ret
= ctf_visitor_parent_links(depth
, node
, log_cfg
);
978 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
979 "Cannot create parent links in metadata's AST: "
985 ret
= _ctf_visitor_semantic_check(depth
, node
, log_cfg
);
987 _BT_COMP_LOGE_APPEND_CAUSE_LINENO(node
->lineno
,
988 "Cannot check metadata's AST semantics: "