[cfe-commits] r167274 - in /cfe/trunk: include/clang/Basic/DiagnosticLexKinds.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td test/Misc/warning-flags.c test/Sema/builtins.c test/Sema/cast-to-union.c test/Sema/exprs.c

Eli Friedman eli.friedman at gmail.com
Thu Nov 1 18:40:23 PDT 2012


Author: efriedma
Date: Thu Nov  1 20:40:23 2012
New Revision: 167274

URL: http://llvm.org/viewvc/llvm-project?rev=167274&view=rev
Log:
Tweak wording and add diagnostic groups to misc diagnostics.


Modified:
    cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Misc/warning-flags.c
    cfe/trunk/test/Sema/builtins.c
    cfe/trunk/test/Sema/cast-to-union.c
    cfe/trunk/test/Sema/exprs.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticLexKinds.td Thu Nov  1 20:40:23 2012
@@ -127,15 +127,16 @@
 def err_multichar_utf_character_literal : Error<
   "Unicode character literals may not contain multiple characters">;
 def err_exponent_has_no_digits : Error<"exponent has no digits">;
-def ext_imaginary_constant : Extension<"imaginary constants are an extension">;
+def ext_imaginary_constant : Extension<
+  "imaginary constants are a GNU extension">, InGroup<GNU>;
 def err_hexconstant_requires_exponent : Error<
   "hexadecimal floating constants require an exponent">;
 def err_hexconstant_requires_digits : Error<
   "hexadecimal floating constants require a significand">;
 def ext_hexconstant_invalid : Extension<
-  "hexadecimal floating constants are a C99 feature">;
+  "hexadecimal floating constants are a C99 feature">, InGroup<C99>;
 def ext_binary_literal : Extension<
-  "binary integer literals are an extension">;
+  "binary integer literals are a GNU extension">, InGroup<GNU>;
 def err_pascal_string_too_long : Error<"Pascal string is too long">;
 def warn_octal_escape_too_large : ExtWarn<"octal escape sequence out of range">;
 def warn_hex_escape_too_large : ExtWarn<"hex escape sequence out of range">;

Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Thu Nov  1 20:40:23 2012
@@ -50,7 +50,7 @@
 def ext_plain_complex : ExtWarn<
   "plain '_Complex' requires a type specifier; assuming '_Complex double'">;
 def ext_integer_complex : Extension<
-  "complex integer types are an extension">;
+  "complex integer types are a GNU extension">, InGroup<GNU>;
 def ext_thread_before : Extension<"'__thread' before '%0'">;
 
 def ext_empty_struct_union : Extension<
@@ -445,7 +445,8 @@
 def err_expected_lbrace_after_base_specifiers : Error<
   "expected '{' after base class list">;
 def ext_ellipsis_exception_spec : Extension<
-  "exception specification of '...' is a Microsoft extension">;
+  "exception specification of '...' is a Microsoft extension">,
+  InGroup<Microsoft>;
 def err_dynamic_and_noexcept_specification : Error<
   "cannot have both throw() and noexcept() clause on the same function">;
 def warn_cxx98_compat_noexcept_decl : Warning<

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Nov  1 20:40:23 2012
@@ -95,7 +95,7 @@
 
 // C99 Designated Initializers
 def ext_designated_init : Extension<
-  "designated initializers are a C99 feature">;
+  "designated initializers are a C99 feature">, InGroup<C99>;
 def err_array_designator_negative : Error<
   "array designator value '%0' is negative">;
 def err_array_designator_empty_range : Error<
@@ -5047,7 +5047,9 @@
   "cast to incomplete type %0">;
 def ext_typecheck_cast_nonscalar : Extension<
   "C99 forbids casting nonscalar type %0 to the same type">;
-def ext_typecheck_cast_to_union : Extension<"C99 forbids casts to union type">;
+def ext_typecheck_cast_to_union : Extension<
+  "cast to union type is a GNU extension">,
+  InGroup<GNU>;
 def err_typecheck_cast_to_union_no_type : Error<
   "cast to union type from type %0 not present in union">;
 def err_cast_pointer_from_non_pointer_int : Error<
@@ -5214,7 +5216,7 @@
 
 def ext_in_class_initializer_non_constant : Extension<
   "in-class initializer for static data member is not a constant expression; "
-  "folding it to a constant is a GNU extension">;
+  "folding it to a constant is a GNU extension">, InGroup<GNU>;
 
 // C++ anonymous unions and GNU anonymous structs/unions
 def ext_anonymous_union : Extension<

Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Thu Nov  1 20:40:23 2012
@@ -173,4 +173,4 @@
 
 The list of warnings in -Wpedantic should NEVER grow.
 
-CHECK: Number in -Wpedantic (not covered by other -W flags): 37
+CHECK: Number in -Wpedantic (not covered by other -W flags): 29

Modified: cfe/trunk/test/Sema/builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtins.c?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/test/Sema/builtins.c (original)
+++ cfe/trunk/test/Sema/builtins.c Thu Nov  1 20:40:23 2012
@@ -40,7 +40,7 @@
 
   old = __sync_fetch_and_add();  // expected-error {{too few arguments to function call}}
   old = __sync_fetch_and_add(&old);  // expected-error {{too few arguments to function call}}
-  old = __sync_fetch_and_add((unsigned*)0, 42i); // expected-warning {{imaginary constants are an extension}}
+  old = __sync_fetch_and_add((unsigned*)0, 42i); // expected-warning {{imaginary constants are a GNU extension}}
 
   // PR7600: Pointers are implicitly casted to integers and back.
   void *old_ptr = __sync_val_compare_and_swap((void**)0, 0, 0);

Modified: cfe/trunk/test/Sema/cast-to-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/cast-to-union.c?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/test/Sema/cast-to-union.c (original)
+++ cfe/trunk/test/Sema/cast-to-union.c Thu Nov  1 20:40:23 2012
@@ -4,16 +4,16 @@
 void f(union u);
 
 void test(int x) {
-  f((union u)x); // expected-warning {{C99 forbids casts to union type}}
+  f((union u)x); // expected-warning {{cast to union type is a GNU extension}}
   f((union u)&x); // expected-error {{cast to union type from type 'int *' not present in union}}
   f((union u)2U); // expected-error {{cast to union type from type 'unsigned int' not present in union}}
 }
 
-union u w = (union u)2; // expected-warning {{C99 forbids casts to union type}}
+union u w = (union u)2; // expected-warning {{cast to union type is a GNU extension}}
 union u ww = (union u)1.0; // expected-error{{cast to union type from type 'double' not present in union}}
 union u x = 7; // expected-error{{initializing 'union u' with an expression of incompatible type 'int'}}
 int i;
-union u zz = (union u)i; // expected-error{{initializer element is not a compile-time constant}}  expected-warning {{C99 forbids casts to union type}}
+union u zz = (union u)i; // expected-error{{initializer element is not a compile-time constant}}  expected-warning {{cast to union type is a GNU extension}}
 
 struct s {int a, b;};
 struct s y = { 1, 5 };

Modified: cfe/trunk/test/Sema/exprs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/exprs.c?rev=167274&r1=167273&r2=167274&view=diff
==============================================================================
--- cfe/trunk/test/Sema/exprs.c (original)
+++ cfe/trunk/test/Sema/exprs.c Thu Nov  1 20:40:23 2012
@@ -40,7 +40,7 @@
 }
 
 _Complex double test2() {
-  return 1.0if;    // expected-warning {{imaginary constants are an extension}}
+  return 1.0if;    // expected-warning {{imaginary constants are a GNU extension}}
 }
 
 // rdar://6097308





More information about the cfe-commits mailing list