callgraph: same-file C++ free-function overloads stop as ambiguous regardless of arguments

Đang mở
#197 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
67/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, rust
Lĩnh vực
devtools

Hướng nghiên cứu

Start by tracing how callchain resolves C++ free-function calls and compare that path with the member-call overload disambiguation mentioned in the issue. Use the reproducer and run callchain call_over --up 0 --down 3; done means it follows over(int) to over1_leaf and never follows over0_leaf.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Direct callgraph resolution for C++ free functions ignores call arity and argument types, so an unambiguous call to an overloaded free function stops at [ambiguous:] instead of following the matching overload.

Reproducer

void over0_leaf() {}
void over1_leaf() {}
void over() { over0_leaf(); }
void over(int x) { (void)x; over1_leaf(); }
void call_over() { over(1); }

Running callchain call_over --up 0 --down 3 stops at over as [ambiguous:] rather than resolving over(1) to over(int) (over1_leaf).

Expected behavior

call_over should resolve over(1) to over(int) and follow over1_leaf (while still never following over0_leaf), matching the arity/type overload disambiguation already done for member calls.

Ngôn ngữ chính
Rust
Star
187
Fork
53
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
79

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của facebookexperimental/semcode

Tất cả issue của facebookexperimental/semcode

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.