[cfe-commits] r97919 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td test/Parser/altivec.c test/Parser/cxx-altivec.cpp

Chris Lattner sabre at nondot.org
Sun Mar 7 10:50:21 PST 2010


Author: lattner
Date: Sun Mar  7 12:50:21 2010
New Revision: 97919

URL: http://llvm.org/viewvc/llvm-project?rev=97919&view=rev
Log:
implement support for -Wno-deprecated, PR6534.  While
I'm in there, change the altivec diagnostics to use 'double' 
instead of "double" for consistency.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Parser/altivec.c
    cfe/trunk/test/Parser/cxx-altivec.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Sun Mar  7 12:50:21 2010
@@ -90,6 +90,7 @@
 def warn_drv_conflicting_deployment_targets : Warning<
   "conflicting deployment targets, both MACOSX_DEPLOYMENT_TARGET '%0' and IPHONEOS_DEPLOYMENT_TARGET '%1' are present in environment">;
 def warn_drv_treating_input_as_cxx : Warning<
-  "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">;
+  "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated">,
+  InGroup<Deprecated>;
 
 }

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Sun Mar  7 12:50:21 2010
@@ -32,6 +32,7 @@
 def Comment : DiagGroup<"comment">;
 def : DiagGroup<"ctor-dtor-privacy">;
 def : DiagGroup<"declaration-after-statement">;
+def Deprecated : DiagGroup<"deprecated">;
 def : DiagGroup<"disabled-optimization">;
 def : DiagGroup<"discard-qual">;
 def : DiagGroup<"div-by-zero">;

Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Sun Mar  7 12:50:21 2010
@@ -159,13 +159,13 @@
 def err_invalid_decl_spec_combination : Error<
   "cannot combine with previous '%0' declaration specifier">;
 def err_invalid_vector_decl_spec_combination : Error<
-  "cannot combine with previous '%0' declaration specifier. \"__vector\" must be first">;
+  "cannot combine with previous '%0' declaration specifier. '__vector' must be first">;
 def err_invalid_pixel_decl_spec_combination : Error<
-  "\"__pixel\" must be preceded by \"__vector\".  '%0' declaration specifier not allowed here">;
+  "'__pixel' must be preceded by '__vector'.  '%0' declaration specifier not allowed here">;
 def err_invalid_vector_double_decl_spec_combination : Error<
-  "cannot use \"double\" with \"__vector\"">;
+  "cannot use 'double' with '__vector'">;
 def warn_vector_long_decl_spec_combination : Warning<
-  "Use of \"long\" with \"__vector\" is deprecated">;
+  "Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
 def err_friend_invalid_in_context : Error<
   "'friend' used outside of class">;
 def err_unknown_typename : Error<

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sun Mar  7 12:50:21 2010
@@ -141,7 +141,8 @@
 def note_using_decl : Note<"%select{|previous }0using declaration">;
 
 def warn_access_decl_deprecated : Warning<
-  "access declarations are deprecated; use using declarations instead">;
+  "access declarations are deprecated; use using declarations instead">,
+  InGroup<Deprecated>;
 
 def err_invalid_thread : Error<
   "'__thread' is only allowed on variable declarations">;
@@ -1788,7 +1789,7 @@
   "array initializer must be an initializer "
   "list%select{| or string literal}0">;
 def warn_deprecated_string_literal_conversion : Warning<
-  "conversion from string literal to %0 is deprecated">;
+  "conversion from string literal to %0 is deprecated">, InGroup<Deprecated>;
 def err_realimag_invalid_type : Error<"invalid type %0 to %1 operator">;
 def err_typecheck_sclass_fscope : Error<
   "illegal storage class on file-scoped variable">;
@@ -2046,7 +2047,7 @@
   "%0 declared here">;
 def err_decrement_bool : Error<"cannot decrement expression of type bool">;
 def warn_increment_bool : Warning<
-  "incrementing expression of type bool is deprecated">;
+  "incrementing expression of type bool is deprecated">, InGroup<Deprecated>;
 def err_catch_incomplete_ptr : Error<
   "cannot catch pointer to incomplete type %0">;
 def err_catch_incomplete_ref : Error<

Modified: cfe/trunk/test/Parser/altivec.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/altivec.c?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/test/Parser/altivec.c (original)
+++ cfe/trunk/test/Parser/altivec.c Sun Mar  7 12:50:21 2010
@@ -41,28 +41,28 @@
 void f_a2(int b, vector int a);
 
 // These should have warnings.
-__vector long vv_l;                 // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector signed long vv_sl;         // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector unsigned long vv_ul;       // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector long int vv_li;            // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector signed long int vv_sli;    // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector unsigned long int vv_uli;  // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector long v_l;                    // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector signed long v_sl;            // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector unsigned long v_ul;          // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector long int v_li;               // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector signed long int v_sli;       // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector unsigned long int v_uli;     // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector long double  vv_ld;        // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
-vector long double  v_ld;           // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
+__vector long vv_l;                 // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector signed long vv_sl;         // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector unsigned long vv_ul;       // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector long int vv_li;            // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector signed long int vv_sli;    // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector unsigned long int vv_uli;  // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector long v_l;                    // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector signed long v_sl;            // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector unsigned long v_ul;          // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector long int v_li;               // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector signed long int v_sli;       // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector unsigned long int v_uli;     // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector long double  vv_ld;        // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
+vector long double  v_ld;           // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
 
 // These should have errors.
-__vector double vv_d;               // expected-error {{cannot use "double" with "__vector"}}
-__vector double vv_d;               // expected-error {{cannot use "double" with "__vector"}}
-vector double v_d;                  // expected-error {{cannot use "double" with "__vector"}}
-vector double v_d;                  // expected-error {{cannot use "double" with "__vector"}}
-__vector long double  vv_ld;        // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
-vector long double  v_ld;           // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
+__vector double vv_d;               // expected-error {{cannot use 'double' with '__vector'}}
+__vector double vv_d;               // expected-error {{cannot use 'double' with '__vector'}}
+vector double v_d;                  // expected-error {{cannot use 'double' with '__vector'}}
+vector double v_d;                  // expected-error {{cannot use 'double' with '__vector'}}
+__vector long double  vv_ld;        // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
+vector long double  v_ld;           // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
 
 void f() {
   __vector unsigned int v = {0,0,0,0};

Modified: cfe/trunk/test/Parser/cxx-altivec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx-altivec.cpp?rev=97919&r1=97918&r2=97919&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx-altivec.cpp (original)
+++ cfe/trunk/test/Parser/cxx-altivec.cpp Sun Mar  7 12:50:21 2010
@@ -43,26 +43,26 @@
 void f_a2(int b, vector int a);
 
 // These should have warnings.
-__vector long vv_l;                 // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector signed long vv_sl;         // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector unsigned long vv_ul;       // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector long int vv_li;            // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector signed long int vv_sli;    // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector unsigned long int vv_uli;  // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector long v_l;                    // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector signed long v_sl;            // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector unsigned long v_ul;          // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector long int v_li;               // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector signed long int v_sli;       // expected-warning {{Use of "long" with "__vector" is deprecated}}
-vector unsigned long int v_uli;     // expected-warning {{Use of "long" with "__vector" is deprecated}}
-__vector long double  vv_ld;        // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
-vector long double  v_ld;           // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
+__vector long vv_l;                 // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector signed long vv_sl;         // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector unsigned long vv_ul;       // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector long int vv_li;            // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector signed long int vv_sli;    // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector unsigned long int vv_uli;  // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector long v_l;                    // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector signed long v_sl;            // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector unsigned long v_ul;          // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector long int v_li;               // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector signed long int v_sli;       // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+vector unsigned long int v_uli;     // expected-warning {{Use of 'long' with '__vector' is deprecated}}
+__vector long double  vv_ld;        // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
+vector long double  v_ld;           // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
 
 // These should have errors.
-__vector double vv_d1;               // expected-error {{cannot use "double" with "__vector"}}
-vector double v_d2;                  // expected-error {{cannot use "double" with "__vector"}}
-__vector long double  vv_ld3;        // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
-vector long double  v_ld4;           // expected-warning {{Use of "long" with "__vector" is deprecated}} expected-error {{cannot use "double" with "__vector"}}
+__vector double vv_d1;               // expected-error {{cannot use 'double' with '__vector'}}
+vector double v_d2;                  // expected-error {{cannot use 'double' with '__vector'}}
+__vector long double  vv_ld3;        // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
+vector long double  v_ld4;           // expected-warning {{Use of 'long' with '__vector' is deprecated}} expected-error {{cannot use 'double' with '__vector'}}
 
 void f() {
   __vector unsigned int v = {0,0,0,0};





More information about the cfe-commits mailing list