[cfe-commits] r107485 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td test/SemaCXX/overloaded-operator.cpp

Nico Weber thakis at chromium.org
Sat Jul 3 09:03:08 PDT 2010


This is causing lots of warnings in our project (and we compile with
-Werror). Gcc and MSVC don't seem to warn about this; maybe you could
add a flag to disable this warning?

Thanks,
Nico

On Fri, Jul 2, 2010 at 9:17 AM, Douglas Gregor <dgregor at apple.com> wrote:
> Author: dgregor
> Date: Fri Jul  2 11:17:01 2010
> New Revision: 107485
>
> URL: http://llvm.org/viewvc/llvm-project?rev=107485&view=rev
> Log:
> By default, warn about commas at the end of an enumerator list in C++/C89.
>
> Modified:
>    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
>    cfe/trunk/test/SemaCXX/overloaded-operator.cpp
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=107485&r1=107484&r2=107485&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Fri Jul  2 11:17:01 2010
> @@ -51,7 +51,7 @@
>   "variable declaration in for loop is a C99-specific feature">;
>  def ext_c99_compound_literal : Extension<
>   "compound literals are a C99-specific feature">;
> -def ext_enumerator_list_comma : Extension<
> +def ext_enumerator_list_comma : ExtWarn<
>   "commas at the end of enumerator lists are a %select{C99|C++0x}0-specific "
>   "feature">;
>
>
> Modified: cfe/trunk/test/SemaCXX/overloaded-operator.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/overloaded-operator.cpp?rev=107485&r1=107484&r2=107485&view=diff
> ==============================================================================
> --- cfe/trunk/test/SemaCXX/overloaded-operator.cpp (original)
> +++ cfe/trunk/test/SemaCXX/overloaded-operator.cpp Fri Jul  2 11:17:01 2010
> @@ -293,7 +293,7 @@
>
>  // PR5360: Arrays should lead to built-in candidates for subscript.
>  typedef enum {
> -  LastReg = 23,
> +  LastReg = 23, // expected-warning{{commas at the end of enumerator lists are a C++0x-specific feature}}
>  } Register;
>  class RegAlloc {
>   int getPriority(Register r) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>




More information about the cfe-commits mailing list