r253506 - [MSVC Compat] Make -Wmicrosoft-cast not an error by default
David Majnemer via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 13:42:38 PST 2015
Author: majnemer
Date: Wed Nov 18 15:42:38 2015
New Revision: 253506
URL: http://llvm.org/viewvc/llvm-project?rev=253506&view=rev
Log:
[MSVC Compat] Make -Wmicrosoft-cast not an error by default
Too much code is sloppy about this to error by default.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=253506&r1=253505&r2=253506&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Nov 18 15:42:38 2015
@@ -2713,8 +2713,7 @@ def warn_impcast_floating_point_to_bool
InGroup<ImplicitConversionFloatingPointToBool>;
def ext_ms_impcast_fn_obj : ExtWarn<
"implicit conversion between pointer-to-function and pointer-to-object is a "
- "Microsoft extension">,
- InGroup<MicrosoftCast>, DefaultError, SFINAEFailure;
+ "Microsoft extension">, InGroup<MicrosoftCast>;
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<MicrosoftCast>, DefaultError, SFINAEFailure;
+ "Microsoft extension">, InGroup<MicrosoftCast>;
def warn_cxx98_compat_cast_fn_obj : Warning<
"cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
InGroup<CXX98CompatPedantic>, DefaultIgnore;
Modified: cfe/trunk/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp?rev=253506&r1=253505&r2=253506&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp (original)
+++ cfe/trunk/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp Wed Nov 18 15:42:38 2015
@@ -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
More information about the cfe-commits
mailing list