summaryrefslogtreecommitdiff
path: root/lib/Serialization/ModuleManager.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
commitab7351b1640dd4a1965d5c0e403d3b864e1f8c9b (patch)
tree19e96d0b94c4c1f76c7a383db78060f46ecd8d07 /lib/Serialization/ModuleManager.cpp
parentcfcd9d4f2e62a85e9d7486b73203f66dfea4da0e (diff)
downloadclang-ab7351b1640dd4a1965d5c0e403d3b864e1f8c9b.tar.gz
clang-ab7351b1640dd4a1965d5c0e403d3b864e1f8c9b.tar.bz2
clang-ab7351b1640dd4a1965d5c0e403d3b864e1f8c9b.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ModuleManager.cpp')
0 files changed, 0 insertions, 0 deletions