r212972 - Avoid non-attributive uses of 'unsupported' in diagnostics

Alp Toker alp at nuanti.com
Mon Jul 14 12:16:23 PDT 2014


Author: alp
Date: Mon Jul 14 14:16:22 2014
New Revision: 212972

URL: http://llvm.org/viewvc/llvm-project?rev=212972&view=rev
Log:
Avoid non-attributive uses of 'unsupported' in diagnostics

We don't have a style guide for diagnostic messages, but convention strongly
favours the forms:

  'attribute is not supported', 'unsupported attribute'

We generally avoid:

  'attribute is unsupported', 'non-supported attribute'

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/Driver/clang_f_opts.c
    cfe/trunk/test/Frontend/invalid-o-level.c
    cfe/trunk/test/SemaCXX/dllexport.cpp
    cfe/trunk/test/SemaCXX/dllimport.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Mon Jul 14 14:16:22 2014
@@ -120,7 +120,7 @@ def err_drv_optimization_remark_pattern
   "%0 in '%1'">;
 
 def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup<Deprecated>;
-def warn_drv_optimization_value : Warning<"optimization level '%0' is unsupported; using '%1%2' instead">,
+def warn_drv_optimization_value : Warning<"optimization level '%0' is not supported; using '%1%2' instead">,
   InGroup<InvalidCommandLineArgument>;
 def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">,
   InGroup<InvalidCommandLineArgument>;

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Mon Jul 14 14:16:22 2014
@@ -349,7 +349,7 @@ def err_invalid_thread : Error<
 def err_thread_non_global : Error<
   "'%0' variables must have global storage">;
 def err_thread_unsupported : Error<
-  "thread-local storage is unsupported for the current target">;
+  "thread-local storage is not supported for the current target">;
 
 def warn_maybe_falloff_nonvoid_function : Warning<
   "control may reach end of non-void function">,
@@ -2131,7 +2131,7 @@ def err_attribute_dll_member_of_dll_clas
 def warn_attribute_dll_instantiated_base_class : Warning<
   "propagating dll attribute to %select{already instantiated|explicitly specialized}0 "
   "base class template "
-  "%select{without dll attribute|with different dll attribute}1 is unsupported">,
+  "%select{without dll attribute|with different dll attribute}1 is not supported">,
   InGroup<DiagGroup<"unsupported-dll-base-class-template">>;
 def err_attribute_weakref_not_static : Error<
   "weakref declaration must have internal linkage">;
@@ -6914,7 +6914,7 @@ def err_uncasted_send_to_unknown_any_met
   "no known method %select{%objcinstance1|%objcclass1}0; cast the "
   "message send to the method's return type">;
 def err_unsupported_unknown_any_decl : Error<
-  "%0 has unknown type, which is unsupported for this kind of declaration">;
+  "%0 has unknown type, which is not supported for this kind of declaration">;
 def err_unsupported_unknown_any_expr : Error<
   "unsupported expression with unknown type">;
 def err_unsupported_unknown_any_call : Error<

Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Mon Jul 14 14:16:22 2014
@@ -127,7 +127,7 @@
 // CHECK-MAX-O: -O3
 
 // RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s
-// CHECK-INVALID-O: warning: optimization level '-O20' is unsupported; using '-O3' instead
+// CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead
 
 // RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s
 // CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1'

Modified: cfe/trunk/test/Frontend/invalid-o-level.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/invalid-o-level.c?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/invalid-o-level.c (original)
+++ cfe/trunk/test/Frontend/invalid-o-level.c Mon Jul 14 14:16:22 2014
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 %s -O900 -o /dev/null 2> %t.log
 // RUN: FileCheck %s -input-file=%t.log
 
-// CHECK: warning: optimization level '-O900' is unsupported; using '-O3' instead
+// CHECK: warning: optimization level '-O900' is not supported; using '-O3' instead

Modified: cfe/trunk/test/SemaCXX/dllexport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/dllexport.cpp?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/dllexport.cpp (original)
+++ cfe/trunk/test/SemaCXX/dllexport.cpp Mon Jul 14 14:16:22 2014
@@ -370,7 +370,7 @@ class __declspec(dllexport) DerivedFromI
 
 #ifdef MS
 // expected-note at +4{{class template 'ClassTemplate<double>' was instantiated here}}
-// expected-warning at +4{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}}
+// expected-warning at +4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
 // expected-note at +3{{attribute is here}}
 #endif
 class DerivedFromTemplateD : public ClassTemplate<double> {};
@@ -378,14 +378,14 @@ class __declspec(dllexport) DerivedFromT
 
 #ifdef MS
 // expected-note at +4{{class template 'ClassTemplate<bool>' was instantiated here}}
-// expected-warning at +4{{propagating dll attribute to already instantiated base class template with different dll attribute is unsupported}}
+// expected-warning at +4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
 // expected-note at +3{{attribute is here}}
 #endif
 class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
 class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
 
 #ifdef MS
-// expected-warning at +3{{propagating dll attribute to explicitly specialized base class template without dll attribute is unsupported}}
+// expected-warning at +3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}}
 // expected-note at +2{{attribute is here}}
 #endif
 struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
@@ -397,7 +397,7 @@ struct __declspec(dllexport) DerivedFrom
 struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
 
 #ifdef MS
-// expected-warning at +3{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}}
+// expected-warning at +3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
 // expected-note at +2{{attribute is here}}
 #endif
 struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};

Modified: cfe/trunk/test/SemaCXX/dllimport.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/dllimport.cpp?rev=212972&r1=212971&r2=212972&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/dllimport.cpp (original)
+++ cfe/trunk/test/SemaCXX/dllimport.cpp Mon Jul 14 14:16:22 2014
@@ -1026,7 +1026,7 @@ class __declspec(dllimport) DerivedFromE
 
 #ifdef MS
 // expected-note at +4{{class template 'ClassTemplate<double>' was instantiated here}}
-// expected-warning at +4{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}}
+// expected-warning at +4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
 // expected-note at +3{{attribute is here}}
 #endif
 class DerivedFromTemplateD : public ClassTemplate<double> {};
@@ -1034,7 +1034,7 @@ class __declspec(dllimport) DerivedFromT
 
 #ifdef MS
 // expected-note at +4{{class template 'ClassTemplate<bool>' was instantiated here}}
-// expected-warning at +4{{propagating dll attribute to already instantiated base class template with different dll attribute is unsupported}}
+// expected-warning at +4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
 // expected-note at +3{{attribute is here}}
 #endif
 class __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate<bool> {};
@@ -1061,7 +1061,7 @@ template <typename T> struct ExplicitlyI
 template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
 
 #ifdef MS
-// expected-warning at +3{{propagating dll attribute to explicitly specialized base class template without dll attribute is unsupported}}
+// expected-warning at +3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}}
 // expected-note at +2{{attribute is here}}
 #endif
 struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
@@ -1073,7 +1073,7 @@ struct __declspec(dllimport) DerivedFrom
 struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
 
 #ifdef MS
-// expected-warning at +3{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}}
+// expected-warning at +3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
 // expected-note at +2{{attribute is here}}
 #endif
 struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};





More information about the cfe-commits mailing list