From 8e53f7b9be2299c6d7e71221f5ed5b86ee7222d8 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 14 Jul 2014 19:16:22 +0000 Subject: [PATCH] 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' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212972 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/DiagnosticDriverKinds.td | 2 +- include/clang/Basic/DiagnosticSemaKinds.td | 6 +++--- test/Driver/clang_f_opts.c | 2 +- test/Frontend/invalid-o-level.c | 2 +- test/SemaCXX/dllexport.cpp | 8 ++++---- test/SemaCXX/dllimport.cpp | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index 0ef82943fa..da2ab065fc 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -120,7 +120,7 @@ def err_drv_optimization_remark_pattern : Error< "%0 in '%1'">; def warn_O4_is_O3 : Warning<"-O4 is equivalent to -O3">, InGroup; -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; def warn_ignored_gcc_optimization : Warning<"optimization flag '%0' is not supported">, InGroup; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 218b968579..6388ffe5eb 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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_class : Error< 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>; def err_attribute_weakref_not_static : Error< "weakref declaration must have internal linkage">; @@ -6914,7 +6914,7 @@ def err_uncasted_send_to_unknown_any_method : Error< "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< diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c index 9c3db16660..441cbf666b 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -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' diff --git a/test/Frontend/invalid-o-level.c b/test/Frontend/invalid-o-level.c index b9e01fcf00..73be9b1c21 100644 --- a/test/Frontend/invalid-o-level.c +++ b/test/Frontend/invalid-o-level.c @@ -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 diff --git a/test/SemaCXX/dllexport.cpp b/test/SemaCXX/dllexport.cpp index 9a53e27957..50d163a7f2 100644 --- a/test/SemaCXX/dllexport.cpp +++ b/test/SemaCXX/dllexport.cpp @@ -370,7 +370,7 @@ class __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassTe #ifdef MS // expected-note@+4{{class template 'ClassTemplate' was instantiated here}} -// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}} +// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}} // expected-note@+3{{attribute is here}} #endif class DerivedFromTemplateD : public ClassTemplate {}; @@ -378,14 +378,14 @@ class __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate #ifdef MS // expected-note@+4{{class template 'ClassTemplate' was instantiated here}} -// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is unsupported}} +// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}} // expected-note@+3{{attribute is here}} #endif class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate {}; class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate {}; #ifdef MS -// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is unsupported}} +// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}} // expected-note@+2{{attribute is here}} #endif struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate {}; @@ -397,7 +397,7 @@ struct __declspec(dllexport) DerivedFromExplicitlyExportSpecializedTemplate : pu struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate {}; #ifdef MS -// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}} +// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}} // expected-note@+2{{attribute is here}} #endif struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate {}; diff --git a/test/SemaCXX/dllimport.cpp b/test/SemaCXX/dllimport.cpp index 855893ccaf..8e826f7ae6 100644 --- a/test/SemaCXX/dllimport.cpp +++ b/test/SemaCXX/dllimport.cpp @@ -1026,7 +1026,7 @@ class __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassTe #ifdef MS // expected-note@+4{{class template 'ClassTemplate' was instantiated here}} -// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}} +// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}} // expected-note@+3{{attribute is here}} #endif class DerivedFromTemplateD : public ClassTemplate {}; @@ -1034,7 +1034,7 @@ class __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate #ifdef MS // expected-note@+4{{class template 'ClassTemplate' was instantiated here}} -// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is unsupported}} +// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}} // expected-note@+3{{attribute is here}} #endif class __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate {}; @@ -1061,7 +1061,7 @@ template struct ExplicitlyImportInstantiatedTemplate { void func() template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate; #ifdef MS -// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is unsupported}} +// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}} // expected-note@+2{{attribute is here}} #endif struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate {}; @@ -1073,7 +1073,7 @@ struct __declspec(dllimport) DerivedFromExplicitlyExportSpecializedTemplate : pu struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate {}; #ifdef MS -// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is unsupported}} +// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}} // expected-note@+2{{attribute is here}} #endif struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate {}; -- 2.40.0