From: David Majnemer Date: Wed, 18 Nov 2015 21:42:38 +0000 (+0000) Subject: [MSVC Compat] Make -Wmicrosoft-cast not an error by default X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0489066880b1af2a2db399126e20447e5eb19f99;p=clang [MSVC Compat] Make -Wmicrosoft-cast not an error by default Too much code is sloppy about this to error by default. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253506 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 995bd157aa..61f3653770 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2713,8 +2713,7 @@ def warn_impcast_floating_point_to_bool : Warning< InGroup; def ext_ms_impcast_fn_obj : ExtWarn< "implicit conversion between pointer-to-function and pointer-to-object is a " - "Microsoft extension">, - InGroup, DefaultError, SFINAEFailure; + "Microsoft extension">, InGroup; def warn_impcast_pointer_to_bool : Warning< "address of%select{| function| array}0 '%1' will always evaluate to " @@ -5580,8 +5579,7 @@ def ext_cast_fn_obj : Extension< "cast between pointer-to-function and pointer-to-object is an extension">; def ext_ms_cast_fn_obj : ExtWarn< "static_cast between pointer-to-function and pointer-to-object is a " - "Microsoft extension">, - InGroup, DefaultError, SFINAEFailure; + "Microsoft extension">, InGroup; def warn_cxx98_compat_cast_fn_obj : Warning< "cast between pointer-to-function and pointer-to-object is incompatible with C++98">, InGroup, DefaultIgnore; diff --git a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp index 85123b54b4..3b80d0937e 100644 --- a/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp +++ b/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++98 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions -Wno-error=microsoft-cast +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++98 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions //MSVC allows forward enum declaration