The node of the method `recv.name`: its receiver-qualified node, else the * flat node . when the method is the one that kept it (the last * declaration of that name in the node's file). */
| 1346 | * flat node <dir>.<name> when the method is the one that kept it (the last |
| 1347 | * declaration of that name in the node's file). */ |
| 1348 | static const cbm_gbuf_node_t *go_method_node(const go_ctx_t *c, const go_pkg_t *pkg, go_str_t recv, |
| 1349 | go_str_t name) { |
| 1350 | const cbm_gbuf_node_t *qualified = go_member_node(c, pkg, GO_MEM_METHOD, recv, name); |
| 1351 | if (qualified) { |
| 1352 | return qualified; |
| 1353 | } |
| 1354 | const cbm_gbuf_node_t *n = go_find_node(c, pkg, name, GO_NO_STR); |
| 1355 | const go_flat_t *fl = go_flat_owner(c, n, pkg, name); |
| 1356 | bool owns = fl && fl->owner == GO_KIND_METHOD && fl->method_recv && |
| 1357 | go_str_eq(recv, fl->method_recv) && go_label_is(n, "Method"); |
| 1358 | return owns ? n : NULL; |
| 1359 | } |
| 1360 | |
| 1361 | static bool go_one_bit(int bits) { |
| 1362 | return bits != 0 && (bits & (bits - SKIP_ONE)) == 0; |
no test coverage detected