| 2873 | } |
| 2874 | |
| 2875 | static const cbm_gbuf_node_t *find_source_node(const cbm_gbuf_t *gbuf, const char *project, |
| 2876 | const char *rel, const char *enclosing_qn) { |
| 2877 | const cbm_gbuf_node_t *src = NULL; |
| 2878 | if (enclosing_qn) { |
| 2879 | src = cbm_gbuf_find_by_qn(gbuf, enclosing_qn); |
| 2880 | /* A class-level reference in a directory-module language carries the |
| 2881 | * DIRECTORY module QN, which hits the shared Folder/Project node — |
| 2882 | * attribute to this file's File node instead (#787). */ |
| 2883 | if (cbm_pipeline_node_is_dir_container(src)) { |
| 2884 | src = NULL; |
| 2885 | } |
| 2886 | } |
| 2887 | if (!src) { |
| 2888 | src = file_node_for(gbuf, project, rel); |
| 2889 | } |
| 2890 | return src; |
| 2891 | } |
| 2892 | |
| 2893 | /* Field type hint resolution for obj.Method() with multiple candidates. |
| 2894 | * Strips C# field prefixes (_ / m_), capitalizes to get type name, and |
no test coverage detected