aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/DFAPacketizer.cpp
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-04-13 16:08:24 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-04-13 16:08:24 +0000
commitaf24ad940d4e80a2b79fb23d542743bbb68b6885 (patch)
treeee819d0997a63f2cbda7cf31a54cd9e043cf34a7 /llvm/lib/CodeGen/DFAPacketizer.cpp
parentadc45bb77b13cb62176cd9c9a3bedd245c5981b1 (diff)
downloadllvm-af24ad940d4e80a2b79fb23d542743bbb68b6885.zip
llvm-af24ad940d4e80a2b79fb23d542743bbb68b6885.tar.gz
llvm-af24ad940d4e80a2b79fb23d542743bbb68b6885.tar.bz2
Fix diagnostics for C-style cast to function type.
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
Diffstat (limited to 'llvm/lib/CodeGen/DFAPacketizer.cpp')
0 files changed, 0 insertions, 0 deletions