[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 2 Jun 2015 22:15:12 +0000 (22:15 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 2 Jun 2015 22:15:12 +0000 (22:15 +0000)
commit85bd1206796df79a61387d0cc8f75a289850a6c0
tree5a48e10ed3856fb3e79f34dd1402551820d636af
parent9c19d35fa78df605b62fc28e8b960d7999d1e07e
[MSVC Compatibility] Permit static_cast from void-ptr to function-ptr

The MSVC 2013 and 2015 implementation of std::atomic is specialized for
pointer types.  The member functions are implemented using a static_cast
from void-ptr to function-ptr which is not allowed in the standard.
Permit this conversion if -fms-compatibility is present.

This fixes PR23733.

llvm-svn: 238877
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaCast.cpp
clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp