forked from OSchip/llvm-project
af24ad940d
If the C-style type cast is applied to the overloaded function and the destination type is function type, then Clang will crash with assertion failure. For example, void foo(int); void foo(int, int); void bar() { typedef void (ft)(int); ft p = (ft)foo; } In this case, the overloaded function foo will be cast to a function type, which should be considered as an error. But, unfortunately, since the function resolution is using canonical type, the matched function will be returned, and result in SEGV. This patch fixes this issue by removing the assertion and add some error diagnostics as the one in static_cast. llvm-svn: 206133 |
||
---|---|---|
clang | ||
clang-tools-extra | ||
compiler-rt | ||
debuginfo-tests | ||
libclc | ||
libcxx | ||
libcxxabi | ||
lld | ||
lldb | ||
llvm | ||
openmp | ||
polly |