Skip to content

Commit 24c89bb

Browse files
authored
[clang] Reword apologetic Clang diagnostic messages (#76310)
Fixes Issue: #61256
1 parent 3ae8746 commit 24c89bb

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ def err_cannot_open_file : Error<"cannot open file '%0': %1">, DefaultFatal;
358358
def err_file_modified : Error<
359359
"file '%0' modified since it was first processed">, DefaultFatal;
360360
def err_file_too_large : Error<
361-
"sorry, unsupported: file '%0' is too large for Clang to process">;
361+
"file '%0' is too large for Clang to process">;
362362
def err_sloc_space_too_large : Error<
363-
"sorry, the translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
363+
"translation unit is too large for Clang to process: ran out of source locations">, DefaultFatal;
364364
def err_unsupported_bom : Error<"%0 byte order mark detected in '%1', but "
365365
"encoding is not supported">, DefaultFatal;
366366
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
@@ -5145,7 +5145,7 @@ def err_non_type_template_arg_subobject : Error<
51455145
def err_non_type_template_arg_addr_label_diff : Error<
51465146
"template argument / label address difference / what did you expect?">;
51475147
def err_non_type_template_arg_unsupported : Error<
5148-
"sorry, non-type template argument of type %0 is not yet supported">;
5148+
"non-type template argument of type %0 is not yet supported">;
51495149
def err_template_arg_not_convertible : Error<
51505150
"non-type template argument of type %0 cannot be converted to a value "
51515151
"of type %1">;
@@ -5198,7 +5198,7 @@ def err_template_arg_not_object_or_func : Error<
51985198
def err_template_arg_not_pointer_to_member_form : Error<
51995199
"non-type template argument is not a pointer to member constant">;
52005200
def err_template_arg_member_ptr_base_derived_not_supported : Error<
5201-
"sorry, non-type template argument of pointer-to-member type %1 that refers "
5201+
"non-type template argument of pointer-to-member type %1 that refers "
52025202
"to member %q0 of a different class is not supported yet">;
52035203
def err_template_arg_invalid : Error<
52045204
"non-type template argument '%0' is invalid">;
@@ -9932,10 +9932,10 @@ def warn_new_dangling_initializer_list : Warning<
99329932
"will be destroyed at the end of the full-expression">,
99339933
InGroup<DanglingInitializerList>;
99349934
def warn_unsupported_lifetime_extension : Warning<
9935-
"sorry, lifetime extension of "
9935+
"lifetime extension of "
99369936
"%select{temporary|backing array of initializer list}0 created "
9937-
"by aggregate initialization using default member initializer "
9938-
"is not supported; lifetime of %select{temporary|backing array}0 "
9937+
"by aggregate initialization using a default member initializer "
9938+
"is not yet supported; lifetime of %select{temporary|backing array}0 "
99399939
"will end at the end of the full-expression">, InGroup<Dangling>;
99409940

99419941
// For non-floating point, expressions of the form x == x or x != x

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 yet supported; lifetime of temporary will end 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
@@ -209,7 +209,7 @@ namespace dr1815 { // dr1815: no
209209
// FIXME: needs codegen test
210210
struct A { int &&r = 0; }; // #dr1815-A
211211
A a = {};
212-
// 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
212+
// since-cxx14-warning@-1 {{lifetime extension of temporary created by aggregate initialization using a default member initializer is not yet supported; lifetime of temporary will end at the end of the full-expression}} FIXME
213213
// since-cxx14-note@#dr1815-A {{initializing field 'r' with default member initializer}}
214214

215215
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/SemaCXX/constexpr-default-arg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ void test_default_arg2() {
3434
// Check that multiple CXXDefaultInitExprs don't cause an assertion failure.
3535
struct A { int &&r = 0; }; // expected-note 2{{default member initializer}}
3636
struct B { A x, y; };
37-
B b = {}; // expected-warning 2{{not supported}}
37+
B b = {}; // expected-warning 2{{lifetime extension of temporary created by aggregate initialization using a default member initializer is not yet supported}}
3838

3939
}

clang/test/SemaCXX/eval-crashes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace pr33140_2 {
2929
// temporaries.
3030
struct A { int &&r = 0; }; // expected-note 2{{initializing field 'r' with default member initializer}}
3131
struct B { A x, y; };
32-
B b = {}; // expected-warning 2{{not supported}}
32+
B b = {}; // expected-warning 2{{lifetime extension of temporary created by aggregate initialization using a default member initializer is not yet supported}}
3333
}
3434

3535
namespace pr33140_3 {

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 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 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)