[cfe-commits] r141087 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/Misc/warning-flags.c

Ted Kremenek kremenek at apple.com
Tue Oct 4 08:41:53 PDT 2011


Author: kremenek
Date: Tue Oct  4 10:41:53 2011
New Revision: 141087

URL: http://llvm.org/viewvc/llvm-project?rev=141087&view=rev
Log:
Place diagnostic ext_predef_outside_function under a -W flag.  Fixes <rdar://problem/10226192>.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Misc/warning-flags.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=141087&r1=141086&r2=141087&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Oct  4 10:41:53 2011
@@ -23,7 +23,8 @@
 
 // Semantic analysis of constant literals.
 def ext_predef_outside_function : Warning<
-  "predefined identifier is only valid inside function">;
+  "predefined identifier is only valid inside function">,
+  InGroup<DiagGroup<"predefined-identifier-outside-function">>;
 def warn_float_overflow : Warning<
   "magnitude of floating-point constant too large for type %0; maximum is %1">,
    InGroup<LiteralRange>;

Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=141087&r1=141086&r2=141087&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Tue Oct  4 10:41:53 2011
@@ -17,7 +17,7 @@
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
-CHECK: Warnings without flags (304):
+CHECK: Warnings without flags (303):
 CHECK-NEXT:   backslash_newline_space
 CHECK-NEXT:   charize_microsoft_ext
 CHECK-NEXT:   ext_anon_param_requires_type_specifier
@@ -81,7 +81,6 @@
 CHECK-NEXT:   ext_pp_line_too_big
 CHECK-NEXT:   ext_pp_macro_redef
 CHECK-NEXT:   ext_pp_warning_directive
-CHECK-NEXT:   ext_predef_outside_function
 CHECK-NEXT:   ext_return_has_void_expr
 CHECK-NEXT:   ext_subscript_non_lvalue
 CHECK-NEXT:   ext_template_arg_extra_parens





More information about the cfe-commits mailing list