r180773 - Place bitfield -Wconstant-conversion warning into subgroup called -Wbitfield-constant-conversion.

Ted Kremenek kremenek at apple.com
Tue Apr 30 00:10:22 PDT 2013


Author: kremenek
Date: Tue Apr 30 02:10:22 2013
New Revision: 180773

URL: http://llvm.org/viewvc/llvm-project?rev=180773&view=rev
Log:
Place bitfield -Wconstant-conversion warning into subgroup called -Wbitfield-constant-conversion.

This is to just allow more precise diagnostic control.

Implements <rdar://problem/13766026>.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=180773&r1=180772&r2=180773&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Apr 30 02:10:22 2013
@@ -27,7 +27,9 @@ def ArrayBoundsPointerArithmetic : DiagG
 def Availability : DiagGroup<"availability">;
 def Section : DiagGroup<"section">;
 def AutoImport : DiagGroup<"auto-import">;
-def ConstantConversion : DiagGroup<"constant-conversion">;
+def BitFieldConstantConversion : DiagGroup<"bitfield-constant-conversion">;
+def ConstantConversion :
+  DiagGroup<"constant-conversion", [ BitFieldConstantConversion ] >;
 def LiteralConversion : DiagGroup<"literal-conversion">;
 def StringConversion : DiagGroup<"string-conversion">;
 def SignConversion : DiagGroup<"sign-conversion">;

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=180773&r1=180772&r2=180773&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Apr 30 02:10:22 2013
@@ -2158,7 +2158,7 @@ def warn_impcast_integer_precision_const
   InGroup<ConstantConversion>;
 def warn_impcast_bitfield_precision_constant : Warning<
   "implicit truncation from %2 to bitfield changes value from %0 to %1">,
-  InGroup<ConstantConversion>;
+  InGroup<BitFieldConstantConversion>;
 def warn_impcast_literal_float_to_integer : Warning<
   "implicit conversion from %0 to %1 changes value from %2 to %3">,
   InGroup<LiteralConversion>;





More information about the cfe-commits mailing list