[cfe-commits] r165361 - in /cfe/trunk/include/clang/Basic: DiagnosticGroups.td DiagnosticSemaKinds.td

Chandler Carruth chandlerc at google.com
Mon Oct 8 15:49:29 PDT 2012


On Fri, Oct 5, 2012 at 10:25 PM, Ted Kremenek <kremenek at apple.com> wrote:

> Author: kremenek
> Date: Sat Oct  6 00:25:43 2012
> New Revision: 165361
>
> URL: http://llvm.org/viewvc/llvm-project?rev=165361&view=rev
> Log:
> Place warn_impcast_different_enum_types in a new warning group,
> -Wenum-conversion, that is a subgroup of -Wconversion.
>

Ted, it doesn't look like this patch actually added -Wenum-conversion as a
subgroup of -Wconversion, and we had regressions from code that used
-Wno-conversion and started to get -Wenum-conversion warnings.

I've fixed this in r165440, could you take a look and make sure that looks
right? Also, a test case for -Wno-conversion turning it off might not go
amiss... I wonder if we could generated test cases for all of the set logic
we currently have and then just have nice simple diffs when we change
it.... Maybe not worth it.


>
> 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=165361&r1=165360&r2=165361&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Sat Oct  6 00:25:43
> 2012
> @@ -33,6 +33,7 @@
>  def SignConversion : DiagGroup<"sign-conversion">;
>  def BoolConversion : DiagGroup<"bool-conversion">;
>  def IntConversion : DiagGroup<"int-conversion">;
> +def EnumConversion : DiagGroup<"enum-conversion">;
>  def NonLiteralNullConversion : DiagGroup<"non-literal-null-conversion">;
>  def NullConversion : DiagGroup<"null-conversion">;
>  def ImplicitConversionFloatingPointToBool :
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=165361&r1=165360&r2=165361&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sat Oct  6
> 00:25:43 2012
> @@ -1970,7 +1970,7 @@
>    InGroup<StringConversion>, DefaultIgnore;
>  def warn_impcast_different_enum_types : Warning<
>    "implicit conversion from enumeration type %0 to different enumeration
> type "
> -  "%1">, InGroup<DiagGroup<"conversion">>;
> +  "%1">, InGroup<EnumConversion>;
>  def warn_impcast_bool_to_null_pointer : Warning<
>      "initialization of pointer of type %0 to null from a constant boolean
> "
>      "expression">, InGroup<BoolConversion>;
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121008/61ee987f/attachment.html>


More information about the cfe-commits mailing list