[PATCH] Let "-w" ignore all warnings

Daniel Jasper djasper at google.com
Tue Mar 19 05:09:46 PDT 2013


Hi rsmith,

Currently, it does not influence warnings that are promoted to error by default (e.g. -Wstatic-float-init).

I am not entirely sure I am doing the right thing at the right place, so I'd be happy about input.

http://llvm-reviews.chandlerc.com/D551

Files:
  lib/Basic/DiagnosticIDs.cpp

Index: lib/Basic/DiagnosticIDs.cpp
===================================================================
--- lib/Basic/DiagnosticIDs.cpp
+++ lib/Basic/DiagnosticIDs.cpp
@@ -471,7 +471,8 @@
 
   // Honor -w, which is lower in priority than pedantic-errors, but higher than
   // -Werror.
-  if (Result == DiagnosticIDs::Warning && Diag.IgnoreAllWarnings)
+  if ((DiagClass <= CLASS_EXTENSION || Result == DiagnosticIDs::Warning) &&
+      Diag.IgnoreAllWarnings)
     return DiagnosticIDs::Ignored;
 
   // If -Werror is enabled, map warnings to errors unless explicitly disabled.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D551.1.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130319/1eb5dfb6/attachment.bin>


More information about the cfe-commits mailing list