Skip to content

Commit e44c28f

Browse files
authored
[clang] Replace "can't" and "can not" in diagnostics with "cannot" (#116623)
See https://discourse.llvm.org/t/cant-cannot-can-not-in-diagnostic-messages/83171
1 parent b42a816 commit e44c28f

32 files changed

+79
-79
lines changed

clang/include/clang/Basic/DiagnosticCommonKinds.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ def err_target_unsupported_abi_with_fpu : Error<
364364

365365
def err_ppc_impossible_musttail: Error<
366366
"'musttail' attribute for this call is impossible because %select{"
367-
"long calls can not be tail called on PPC|"
368-
"indirect calls can not be tail called on PPC|"
369-
"external calls can not be tail called on PPC}0"
367+
"long calls cannot be tail called on PPC|"
368+
"indirect calls cannot be tail called on PPC|"
369+
"external calls cannot be tail called on PPC}0"
370370
>;
371371
def err_aix_musttail_unsupported: Error<
372372
"'musttail' attribute is not supported on AIX">;

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def err_test_module_file_extension_format : Error<
553553
"'blockname:major:minor:hashed:user info'">;
554554

555555
def err_drv_module_output_with_multiple_arch : Error<
556-
"option '-fmodule-output' can't be used with multiple arch options">;
556+
"option '-fmodule-output' cannot be used with multiple arch options">;
557557

558558
def warn_drv_delayed_template_parsing_after_cxx20 : Warning<
559559
"-fdelayed-template-parsing is deprecated after C++20">,

clang/include/clang/Basic/DiagnosticRefactoringKinds.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let Component = "Refactoring" in {
1414

1515
let CategoryName = "Refactoring Invocation Issue" in {
1616

17-
def err_refactor_no_selection : Error<"refactoring action can't be initiated "
17+
def err_refactor_no_selection : Error<"refactoring action cannot be initiated "
1818
"without a selection">;
1919
def err_refactor_selection_no_symbol : Error<"there is no symbol at the given "
2020
"location">;
@@ -26,7 +26,7 @@ def err_refactor_code_outside_of_function : Error<"the selected code is not a "
2626
def err_refactor_extract_simple_expression : Error<"the selected expression "
2727
"is too simple to extract">;
2828
def err_refactor_extract_prohibited_expression : Error<"the selected "
29-
"expression can't be extracted">;
29+
"expression cannot be extracted">;
3030

3131
}
3232

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ def err_pragma_attribute_matcher_subrule_contradicts_rule : Error<
11511151
def err_pragma_attribute_matcher_negated_subrule_contradicts_subrule : Error<
11521152
"negated attribute subject matcher sub-rule '%0' contradicts sub-rule '%1'">;
11531153
def err_pragma_attribute_invalid_matchers : Error<
1154-
"attribute %0 can't be applied to %1">;
1154+
"attribute %0 cannot be applied to %1">;
11551155
def err_pragma_attribute_stack_mismatch : Error<
11561156
"'#pragma clang attribute %select{%1.|}0pop' with no matching"
11571157
" '#pragma clang attribute %select{%1.|}0push'">;
@@ -6150,7 +6150,7 @@ def err_mismatched_owning_module : Error<
61506150
"declaration of %0 in %select{the global module|module %2}1 follows "
61516151
"declaration in %select{the global module|module %4}3">;
61526152
def err_multiple_decl_in_different_modules : Error<
6153-
"declaration %0 attached to named module '%1' can't be attached to "
6153+
"declaration %0 attached to named module '%1' cannot be attached to "
61546154
"other modules">;
61556155
def err_redefinition_different_type : Error<
61566156
"redefinition of %0 with a different type%diff{: $ vs $|}1,2">;
@@ -8560,7 +8560,7 @@ def err_typecheck_missing_return_type_incompatible : Error<
85608560
"literal|lambda expression}2 has unspecified explicit return type">;
85618561

85628562
def note_incomplete_class_and_qualified_id : Note<
8563-
"conformance of forward class %0 to protocol %1 can not be confirmed">;
8563+
"conformance of forward class %0 to protocol %1 cannot be confirmed">;
85648564
def warn_incompatible_qualified_id : Warning<
85658565
"%select{%diff{assigning to $ from incompatible type $|"
85668566
"assigning to type from incompatible type}0,1"
@@ -9414,7 +9414,7 @@ let CategoryName = "Inline Assembly Issue" in {
94149414
"asm constraint has an unexpected number of alternatives: %0 vs %1">;
94159415
def err_asm_incomplete_type : Error<"asm operand has incomplete type %0">;
94169416
def err_asm_unknown_register_name : Error<"unknown register name '%0' in asm">;
9417-
def err_asm_unwind_and_goto : Error<"unwind clobber can't be used with asm goto">;
9417+
def err_asm_unwind_and_goto : Error<"unwind clobber cannot be used with asm goto">;
94189418
def err_asm_invalid_global_var_reg : Error<"register '%0' unsuitable for "
94199419
"global register variables on this target">;
94209420
def err_asm_register_size_mismatch : Error<"size of register '%0' does not "
@@ -9433,7 +9433,7 @@ let CategoryName = "Inline Assembly Issue" in {
94339433
def err_asm_input_duplicate_match : Error<
94349434
"more than one input constraint matches the same output '%0'">;
94359435
def err_store_value_to_reg : Error<
9436-
"impossible constraint in asm: can't store value into a register">;
9436+
"impossible constraint in asm: cannot store value into a register">;
94379437

94389438
def warn_asm_label_on_auto_decl : Warning<
94399439
"ignored asm label '%0' on automatic variable">;
@@ -10960,7 +10960,7 @@ def err_opencl_builtin_pipe_invalid_access_modifier : Error<
1096010960
def err_opencl_invalid_access_qualifier : Error<
1096110961
"access qualifier can only be used for pipe and image type">;
1096210962
def err_opencl_invalid_read_write : Error<
10963-
"access qualifier %0 can not be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 "
10963+
"access qualifier %0 cannot be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 "
1096410964
"and without __opencl_c_read_write_images feature}2">;
1096510965
def err_opencl_multiple_access_qualifiers : Error<
1096610966
"multiple access qualifiers">;
@@ -11460,7 +11460,7 @@ def err_omp_wrong_linear_modifier : Error<
1146011460
def err_omp_wrong_linear_modifier_non_reference : Error<
1146111461
"variable of non-reference type %0 can be used only with 'val' modifier, but used with '%1'">;
1146211462
def err_omp_step_simple_modifier_exclusive : Error<
11463-
"step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier">;
11463+
"step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier">;
1146411464
def err_omp_wrong_simdlen_safelen_values : Error<
1146511465
"the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter">;
1146611466
def err_omp_wrong_if_directive_name_modifier : Error<
@@ -11534,7 +11534,7 @@ def err_omp_schedule_nonmonotonic_static : Error<
1153411534
def err_omp_simple_clause_incompatible_with_ordered : Error<
1153511535
"'%0' clause with '%1' modifier cannot be specified if an 'ordered' clause is specified">;
1153611536
def err_omp_ordered_simd : Error<
11537-
"'ordered' clause with a parameter can not be specified in '#pragma omp %0' directive">;
11537+
"'ordered' clause with a parameter cannot be specified in '#pragma omp %0' directive">;
1153811538
def err_omp_variable_in_given_clause_and_dsa : Error<
1153911539
"%0 variable cannot be in a %1 clause in '#pragma omp %2' directive">;
1154011540
def err_omp_param_or_this_in_clause : Error<

clang/test/CodeGen/PowerPC/musttail-forward-declaration-inline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
inline int func2(int i);
55
int external_call2(int i) {
6-
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
6+
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
77
[[clang::musttail]] return func2(i);
88
}
99

clang/test/CodeGen/PowerPC/musttail-forward-declaration-weak.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
int func2(int i);
55
int external_call2(int i) {
6-
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
6+
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
77
[[clang::musttail]] return func2(i);
88
}
99

clang/test/CodeGen/PowerPC/musttail-indirect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
void name(int *params) {
55
auto fn = (void (*)(int *))1;
6-
// expected-error@+1 {{'musttail' attribute for this call is impossible because indirect calls can not be tail called on PPC}}
6+
// expected-error@+1 {{'musttail' attribute for this call is impossible because indirect calls cannot be tail called on PPC}}
77
[[clang::musttail]] return fn(params);
88
}

clang/test/CodeGen/PowerPC/musttail-inline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ inline int foo(int x) {
77

88
int bar(int x)
99
{
10-
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
10+
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
1111
[[clang::musttail]] return foo(1);
1212
}

clang/test/CodeGen/PowerPC/musttail-undefined.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ int foo(int x);
55

66
int bar(int x)
77
{
8-
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
8+
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
99
[[clang::musttail]] return foo(x);
1010
}

clang/test/CodeGen/PowerPC/musttail-weak.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ __attribute__((weak)) int func2(int i) {
77
return 0;
88
}
99
int external_call2(int i) {
10-
// linux-error@+2 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
10+
// linux-error@+2 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
1111
// aix-error@+1 {{'musttail' attribute is not supported on AIX}}
1212
[[clang::musttail]] return func2(i);
1313
}

0 commit comments

Comments
 (0)