Skip to content

Commit 82fe20f

Browse files
committed
[clang] Reword apologetic Clang diagnostic messages
Fixes Issue: #61256
1 parent acacec3 commit 82fe20f

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
355355
def err_file_modified : Error<
356356
"file '%0' modified since it was first processed">, DefaultFatal;
357357
def err_file_too_large : Error<
358-
"sorry, unsupported: file '%0' is too large for Clang to process">;
358+
"file '%0' is too large for Clang to process">;
359359
def err_sloc_space_too_large : Error<
360-
"sorry, the translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
360+
"translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
361361
def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
362362
"encoding is not supported">, DefaultFatal;
363363
def err_unable_to_rename_temp : Error<

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5135,7 +5135,7 @@ def err_non_type_template_arg_subobject : Error<
51355135
def err_non_type_template_arg_addr_label_diff : Error<
51365136
"template argument / label address difference / what did you expect?">;
51375137
def err_non_type_template_arg_unsupported : Error<
5138-
"sorry, non-type template argument of type %0 is not yet supported">;
5138+
"non-type template argument of type %0 is not yet supported">;
51395139
def err_template_arg_not_convertible : Error<
51405140
"non-type template argument of type %0 cannot be converted to a value "
51415141
"of type %1">;
@@ -5188,7 +5188,7 @@ def err_template_arg_not_object_or_func : Error<
51885188
def err_template_arg_not_pointer_to_member_form : Error<
51895189
"non-type template argument is not a pointer to member constant">;
51905190
def err_template_arg_member_ptr_base_derived_not_supported : Error<
5191-
"sorry, non-type template argument of pointer-to-member type %1 that refers "
5191+
"non-type template argument of a pointer to member type %1, that refers "
51925192
"to member %q0 of a different class is not supported yet">;
51935193
def err_template_arg_invalid : Error<
51945194
"non-type template argument '%0' is invalid">;
@@ -9913,11 +9913,11 @@ def warn_new_dangling_initializer_list : Warning<
99139913
"will be destroyed at the end of the full-expression">,
99149914
InGroup<DanglingInitializerList>;
99159915
def warn_unsupported_lifetime_extension : Warning<
9916-
"sorry, lifetime extension of "
9916+
"lifetime extension of "
99179917
"%select{temporary|backing array of initializer list}0 created "
9918-
"by aggregate initialization using default member initializer "
9918+
"by aggregate initialization using a default member initializer "
99199919
"is not supported; lifetime of %select{temporary|backing array}0 "
9920-
"will end at the end of the full-expression">, InGroup<Dangling>;
9920+
"will terminate at the end of the full-expression">, InGroup<Dangling>;
99219921

99229922
// For non-floating point, expressions of the form x == x or x != x
99239923
// should result in a warning, since these always evaluate to a constant.

clang/test/CXX/drs/dr16xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ namespace dr1696 { // dr1696: 7
472472
const A &a = A(); // #dr1696-D1-a
473473
};
474474
D1 d1 = {}; // #dr1696-d1
475-
// since-cxx14-warning@-1 {{sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression}}
475+
// since-cxx14-warning@-1 {{lifetime extension of temporary created by aggregate initialization using a default member initializer is not supported; lifetime of temporary will terminate at the end of the full-expression}}
476476
// since-cxx14-note@#dr1696-D1-a {{initializing field 'a' with default member initializer}}
477477

478478
struct D2 {

clang/test/CXX/drs/dr18xx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace dr1815 { // dr1815: no
5656
// FIXME: needs codegen test
5757
struct A { int &&r = 0; }; // #dr1815-A
5858
A a = {};
59-
// since-cxx14-warning@-1 {{sorry, lifetime extension of temporary created by aggregate initialization using default member initializer is not supported; lifetime of temporary will end at the end of the full-expression}} FIXME
59+
// since-cxx14-warning@-1 {{lifetime extension of temporary created by aggregate initialization using a default member initializer is not supported; lifetime of temporary will terminate at the end of the full-expression}} FIXME
6060
// since-cxx14-note@#dr1815-A {{initializing field 'r' with default member initializer}}
6161

6262
struct B { int &&r = 0; }; // #dr1815-B

clang/test/Lexer/SourceLocationsOverflow.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: not %clang %s -S -o - 2>&1 | FileCheck %s
22
// CHECK: In file included from {{.*}}SourceLocationsOverflow.c
3-
// CHECK-NEXT: inc1.h{{.*}}: fatal error: sorry, the translation unit is too large for Clang to process: ran out of source locations
3+
// CHECK-NEXT: inc1.h{{.*}}: fatal error: translation unit is too large for Clang to process: ran out of source locations
44
// CHECK-NEXT: #include "inc2.h"
55
// CHECK-NEXT: ^
66
// CHECK-NEXT: note: 214{{.......}}B in local locations, 0B in locations loaded from AST files, for a total of 214{{.......}}B (99% of available space)

clang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ namespace Auto {
205205

206206
struct Y : X {};
207207
void type_affects_identity(B<&X::n>) {}
208-
void type_affects_identity(B<(int Y::*)&X::n>) {} // FIXME: expected-error {{sorry}}
208+
void type_affects_identity(B<(int Y::*)&X::n>) {} // FIXME: expected-error {{non-type template argument of a pointer to member type}}
209209
void type_affects_identity(B<(const int X::*)&X::n>) {}
210-
void type_affects_identity(B<(const int Y::*)&X::n>) {} // FIXME: expected-error {{sorry}}
210+
void type_affects_identity(B<(const int Y::*)&X::n>) {} // FIXME: expected-error {{non-type template argument of a pointer to member type}}
211211

212212
// A case where we need to do auto-deduction, and check whether the
213213
// resulting dependent types match during partial ordering. These

clang/test/SemaTemplate/temp_arg_nontype_cxx20.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ namespace std {
88

99
// floating-point arguments
1010
template<float> struct Float {};
11-
using F1 = Float<1.0f>; // FIXME expected-error {{sorry}}
12-
using F1 = Float<2.0f / 2>; // FIXME expected-error {{sorry}}
11+
using F1 = Float<1.0f>; // FIXME expected-error {{non-type template argument of type}}
12+
using F1 = Float<2.0f / 2>; // FIXME expected-error {{non-type template argument of type}}
1313

1414
struct S { int n[3]; } s; // expected-note 1+{{here}}
1515
union U { int a, b; } u;
@@ -48,12 +48,12 @@ using U1 = Union<U{.b = 1}>; // expected-error {{different types}}
4848

4949
// miscellaneous scalar types
5050
template<_Complex int> struct ComplexInt {};
51-
using CI = ComplexInt<1 + 3i>; // FIXME: expected-error {{sorry}}
52-
using CI = ComplexInt<1 + 3i>; // FIXME: expected-error {{sorry}}
51+
using CI = ComplexInt<1 + 3i>; // FIXME: expected-error {{non-type template argument of type}}
52+
using CI = ComplexInt<1 + 3i>; // FIXME: expected-error {{non-type template argument of type}}
5353

5454
template<_Complex float> struct ComplexFloat {};
55-
using CF = ComplexFloat<1.0f + 3.0fi>; // FIXME: expected-error {{sorry}}
56-
using CF = ComplexFloat<1.0f + 3.0fi>; // FIXME: expected-error {{sorry}}
55+
using CF = ComplexFloat<1.0f + 3.0fi>; // FIXME: expected-error {{non-type template argument of type}}
56+
using CF = ComplexFloat<1.0f + 3.0fi>; // FIXME: expected-error {{non-type template argument of type}}
5757

5858
namespace ClassNTTP {
5959
struct A { // expected-note 2{{candidate}}

0 commit comments

Comments
 (0)