ill-formed program with ambiguity of overload resolution accepted
This program
#include <vector>
struct A {};
void func(std::vector<int>) {}
void func(std::vector<A>);
int main() {
func({ 4 });
}
is rejected by GCC and MSVC due to call of overloaded 'func(<brace-enclosed initializer list>)' is ambiguous, but Clang accepts the program, which seems incorrect since there is no IFNDR here. Online demo: https://godbolt.org/z/Prz4YcsW5
Explanation why the program is ill-formed: https://stackoverflow.com/a/77979372/7325599 GCC developers support it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113884
@llvm/issue-subscribers-clang-frontend
Author: None (Fedr)
struct A {};
void func(std::vector<int>) {} void func(std::vector<A>);
int main() { func({ 4 }); }
is rejected by GCC and MSVC due to `call of overloaded 'func(<brace-enclosed initializer list>)' is ambiguous`, but Clang accepts the program, which seems incorrect since there is no IFNDR here. Online demo: https://godbolt.org/z/Prz4YcsW5
Explanation why the program is ill-formed: https://stackoverflow.com/a/77979372/7325599
GCC developers support it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113884
</details>
I had mentioned the clang bug was already filed as https://github.com/llvm/llvm-project/issues/28016 ...
I would like to take up this issue. Started analysing. I am new to llvm project. @EugeneZelenko, any suggestions where would be really helpful :) I am starting with SemaOverload.cpp. Am I in the right path?
I would like to take up this issue. Started analysing. I am new to llvm project. @EugeneZelenko, any suggestions where would be really helpful :)
Please see the duplicate issue. It is not clear to me whether this is a good beginner issue or not. I have not dug into it and I don't know if I will have time to.
We do have a "good first issue" label: https://github.com/llvm/llvm-project/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+