forked from OSchip/llvm-project
[MSVC Compatibility] Classify ext_ms_cast_fn_obj as DefaultError
This non-conforming extension was introduced to make it possible for us to correctly compile <atomic> in VS 2013 and 2015. Let's limit its impact to system headers to encourage portable code. llvm-svn: 244650
This commit is contained in:
parent
99eb4685ef
commit
f6ae8ae025
|
@ -5436,7 +5436,7 @@ def ext_cast_fn_obj : Extension<
|
||||||
def ext_ms_cast_fn_obj : ExtWarn<
|
def ext_ms_cast_fn_obj : ExtWarn<
|
||||||
"static_cast between pointer-to-function and pointer-to-object is a "
|
"static_cast between pointer-to-function and pointer-to-object is a "
|
||||||
"Microsoft extension">,
|
"Microsoft extension">,
|
||||||
InGroup<MicrosoftCast>;
|
InGroup<MicrosoftCast>, DefaultError, SFINAEFailure;
|
||||||
def warn_cxx98_compat_cast_fn_obj : Warning<
|
def warn_cxx98_compat_cast_fn_obj : Warning<
|
||||||
"cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
|
"cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
|
||||||
InGroup<CXX98CompatPedantic>, DefaultIgnore;
|
InGroup<CXX98CompatPedantic>, DefaultIgnore;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++98 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions
|
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++98 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions -Wno-error=microsoft-cast
|
||||||
|
|
||||||
|
|
||||||
//MSVC allows forward enum declaration
|
//MSVC allows forward enum declaration
|
||||||
|
|
Loading…
Reference in New Issue