[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
This commit is contained in:
parent
b42a816314
commit
e44c28f07e
@ -364,9 +364,9 @@ def err_target_unsupported_abi_with_fpu : Error<
|
||||
|
||||
def err_ppc_impossible_musttail: Error<
|
||||
"'musttail' attribute for this call is impossible because %select{"
|
||||
"long calls can not be tail called on PPC|"
|
||||
"indirect calls can not be tail called on PPC|"
|
||||
"external calls can not be tail called on PPC}0"
|
||||
"long calls cannot be tail called on PPC|"
|
||||
"indirect calls cannot be tail called on PPC|"
|
||||
"external calls cannot be tail called on PPC}0"
|
||||
>;
|
||||
def err_aix_musttail_unsupported: Error<
|
||||
"'musttail' attribute is not supported on AIX">;
|
||||
|
||||
@ -553,7 +553,7 @@ def err_test_module_file_extension_format : Error<
|
||||
"'blockname:major:minor:hashed:user info'">;
|
||||
|
||||
def err_drv_module_output_with_multiple_arch : Error<
|
||||
"option '-fmodule-output' can't be used with multiple arch options">;
|
||||
"option '-fmodule-output' cannot be used with multiple arch options">;
|
||||
|
||||
def warn_drv_delayed_template_parsing_after_cxx20 : Warning<
|
||||
"-fdelayed-template-parsing is deprecated after C++20">,
|
||||
|
||||
@ -14,7 +14,7 @@ let Component = "Refactoring" in {
|
||||
|
||||
let CategoryName = "Refactoring Invocation Issue" in {
|
||||
|
||||
def err_refactor_no_selection : Error<"refactoring action can't be initiated "
|
||||
def err_refactor_no_selection : Error<"refactoring action cannot be initiated "
|
||||
"without a selection">;
|
||||
def err_refactor_selection_no_symbol : Error<"there is no symbol at the given "
|
||||
"location">;
|
||||
@ -26,7 +26,7 @@ def err_refactor_code_outside_of_function : Error<"the selected code is not a "
|
||||
def err_refactor_extract_simple_expression : Error<"the selected expression "
|
||||
"is too simple to extract">;
|
||||
def err_refactor_extract_prohibited_expression : Error<"the selected "
|
||||
"expression can't be extracted">;
|
||||
"expression cannot be extracted">;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1151,7 +1151,7 @@ def err_pragma_attribute_matcher_subrule_contradicts_rule : Error<
|
||||
def err_pragma_attribute_matcher_negated_subrule_contradicts_subrule : Error<
|
||||
"negated attribute subject matcher sub-rule '%0' contradicts sub-rule '%1'">;
|
||||
def err_pragma_attribute_invalid_matchers : Error<
|
||||
"attribute %0 can't be applied to %1">;
|
||||
"attribute %0 cannot be applied to %1">;
|
||||
def err_pragma_attribute_stack_mismatch : Error<
|
||||
"'#pragma clang attribute %select{%1.|}0pop' with no matching"
|
||||
" '#pragma clang attribute %select{%1.|}0push'">;
|
||||
@ -6150,7 +6150,7 @@ def err_mismatched_owning_module : Error<
|
||||
"declaration of %0 in %select{the global module|module %2}1 follows "
|
||||
"declaration in %select{the global module|module %4}3">;
|
||||
def err_multiple_decl_in_different_modules : Error<
|
||||
"declaration %0 attached to named module '%1' can't be attached to "
|
||||
"declaration %0 attached to named module '%1' cannot be attached to "
|
||||
"other modules">;
|
||||
def err_redefinition_different_type : Error<
|
||||
"redefinition of %0 with a different type%diff{: $ vs $|}1,2">;
|
||||
@ -8560,7 +8560,7 @@ def err_typecheck_missing_return_type_incompatible : Error<
|
||||
"literal|lambda expression}2 has unspecified explicit return type">;
|
||||
|
||||
def note_incomplete_class_and_qualified_id : Note<
|
||||
"conformance of forward class %0 to protocol %1 can not be confirmed">;
|
||||
"conformance of forward class %0 to protocol %1 cannot be confirmed">;
|
||||
def warn_incompatible_qualified_id : Warning<
|
||||
"%select{%diff{assigning to $ from incompatible type $|"
|
||||
"assigning to type from incompatible type}0,1"
|
||||
@ -9414,7 +9414,7 @@ let CategoryName = "Inline Assembly Issue" in {
|
||||
"asm constraint has an unexpected number of alternatives: %0 vs %1">;
|
||||
def err_asm_incomplete_type : Error<"asm operand has incomplete type %0">;
|
||||
def err_asm_unknown_register_name : Error<"unknown register name '%0' in asm">;
|
||||
def err_asm_unwind_and_goto : Error<"unwind clobber can't be used with asm goto">;
|
||||
def err_asm_unwind_and_goto : Error<"unwind clobber cannot be used with asm goto">;
|
||||
def err_asm_invalid_global_var_reg : Error<"register '%0' unsuitable for "
|
||||
"global register variables on this target">;
|
||||
def err_asm_register_size_mismatch : Error<"size of register '%0' does not "
|
||||
@ -9433,7 +9433,7 @@ let CategoryName = "Inline Assembly Issue" in {
|
||||
def err_asm_input_duplicate_match : Error<
|
||||
"more than one input constraint matches the same output '%0'">;
|
||||
def err_store_value_to_reg : Error<
|
||||
"impossible constraint in asm: can't store value into a register">;
|
||||
"impossible constraint in asm: cannot store value into a register">;
|
||||
|
||||
def warn_asm_label_on_auto_decl : Warning<
|
||||
"ignored asm label '%0' on automatic variable">;
|
||||
@ -10960,7 +10960,7 @@ def err_opencl_builtin_pipe_invalid_access_modifier : Error<
|
||||
def err_opencl_invalid_access_qualifier : Error<
|
||||
"access qualifier can only be used for pipe and image type">;
|
||||
def err_opencl_invalid_read_write : Error<
|
||||
"access qualifier %0 can not be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 "
|
||||
"access qualifier %0 cannot be used for %1 %select{|prior to OpenCL C version 2.0 or in version 3.0 "
|
||||
"and without __opencl_c_read_write_images feature}2">;
|
||||
def err_opencl_multiple_access_qualifiers : Error<
|
||||
"multiple access qualifiers">;
|
||||
@ -11460,7 +11460,7 @@ def err_omp_wrong_linear_modifier : Error<
|
||||
def err_omp_wrong_linear_modifier_non_reference : Error<
|
||||
"variable of non-reference type %0 can be used only with 'val' modifier, but used with '%1'">;
|
||||
def err_omp_step_simple_modifier_exclusive : Error<
|
||||
"step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier">;
|
||||
"step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier">;
|
||||
def err_omp_wrong_simdlen_safelen_values : Error<
|
||||
"the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter">;
|
||||
def err_omp_wrong_if_directive_name_modifier : Error<
|
||||
@ -11534,7 +11534,7 @@ def err_omp_schedule_nonmonotonic_static : Error<
|
||||
def err_omp_simple_clause_incompatible_with_ordered : Error<
|
||||
"'%0' clause with '%1' modifier cannot be specified if an 'ordered' clause is specified">;
|
||||
def err_omp_ordered_simd : Error<
|
||||
"'ordered' clause with a parameter can not be specified in '#pragma omp %0' directive">;
|
||||
"'ordered' clause with a parameter cannot be specified in '#pragma omp %0' directive">;
|
||||
def err_omp_variable_in_given_clause_and_dsa : Error<
|
||||
"%0 variable cannot be in a %1 clause in '#pragma omp %2' directive">;
|
||||
def err_omp_param_or_this_in_clause : Error<
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
inline int func2(int i);
|
||||
int external_call2(int i) {
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
|
||||
[[clang::musttail]] return func2(i);
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
int func2(int i);
|
||||
int external_call2(int i) {
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
|
||||
[[clang::musttail]] return func2(i);
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,6 @@
|
||||
|
||||
void name(int *params) {
|
||||
auto fn = (void (*)(int *))1;
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because indirect calls can not be tail called on PPC}}
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because indirect calls cannot be tail called on PPC}}
|
||||
[[clang::musttail]] return fn(params);
|
||||
}
|
||||
|
||||
@ -7,6 +7,6 @@ inline int foo(int x) {
|
||||
|
||||
int bar(int x)
|
||||
{
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
|
||||
[[clang::musttail]] return foo(1);
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ int foo(int x);
|
||||
|
||||
int bar(int x)
|
||||
{
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
|
||||
// expected-error@+1 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
|
||||
[[clang::musttail]] return foo(x);
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ __attribute__((weak)) int func2(int i) {
|
||||
return 0;
|
||||
}
|
||||
int external_call2(int i) {
|
||||
// linux-error@+2 {{'musttail' attribute for this call is impossible because external calls can not be tail called on PPC}}
|
||||
// linux-error@+2 {{'musttail' attribute for this call is impossible because external calls cannot be tail called on PPC}}
|
||||
// aix-error@+1 {{'musttail' attribute is not supported on AIX}}
|
||||
[[clang::musttail]] return func2(i);
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ int foo(int x) {
|
||||
int bar(int x)
|
||||
{
|
||||
// good-no-diagnostics
|
||||
// longcall-error@+2 {{'musttail' attribute for this call is impossible because long calls can not be tail called on PPC}}
|
||||
// longcall-error@+2 {{'musttail' attribute for this call is impossible because long calls cannot be tail called on PPC}}
|
||||
// aix-error@+1 {{'musttail' attribute is not supported on AIX}}
|
||||
[[clang::musttail]] return foo(1);
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ void odd_struct(void) {
|
||||
: "=r"(str));
|
||||
#endif
|
||||
}
|
||||
// CHECK-IMPOSSIBLE_ODD: impossible constraint in asm: can't store value into a register
|
||||
// CHECK-IMPOSSIBLE_ODD: impossible constraint in asm: cannot store value into a register
|
||||
|
||||
// Check Clang reports an error if attempting to return a big structure via a register.
|
||||
void big_struct(void) {
|
||||
@ -70,7 +70,7 @@ void big_struct(void) {
|
||||
: "=r"(str));
|
||||
#endif
|
||||
}
|
||||
// CHECK-IMPOSSIBLE_BIG: impossible constraint in asm: can't store value into a register
|
||||
// CHECK-IMPOSSIBLE_BIG: impossible constraint in asm: cannot store value into a register
|
||||
|
||||
// Clang is able to emit LLVM IR for an 16-byte structure.
|
||||
void x_constraint_fit(void) {
|
||||
@ -103,7 +103,7 @@ void x_constraint_nofit(void) {
|
||||
|
||||
// http://crbug.com/999160
|
||||
// Clang used to report the following message:
|
||||
// "impossible constraint in asm: can't store struct into a register"
|
||||
// "impossible constraint in asm: cannot store struct into a register"
|
||||
// for the assembly directive below, although there's no struct.
|
||||
void crbug_999160_regtest(void) {
|
||||
#ifdef IMPOSSIBLE_9BYTES
|
||||
@ -113,7 +113,7 @@ void crbug_999160_regtest(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// CHECK-IMPOSSIBLE_9BYTES: impossible constraint in asm: can't store value into a register
|
||||
// CHECK-IMPOSSIBLE_9BYTES: impossible constraint in asm: cannot store value into a register
|
||||
|
||||
void crbug_999160_regtest_v2(void) {
|
||||
#ifdef IMPOSSIBLE_9BYTES_V2
|
||||
@ -121,4 +121,4 @@ void crbug_999160_regtest_v2(void) {
|
||||
asm("" : "=r"(buf) : "0"(buf));
|
||||
#endif
|
||||
}
|
||||
// CHECK-IMPOSSIBLE_9BYTES_V2: impossible constraint in asm: can't store value into a register
|
||||
// CHECK-IMPOSSIBLE_9BYTES_V2: impossible constraint in asm: cannot store value into a register
|
||||
|
||||
@ -42,7 +42,7 @@ export module Hello;
|
||||
// CHECK: "-emit-module-interface" {{.*}}"-main-file-name" "Hello.cppm" {{.*}}"-o" "{{.*}}/output/Hello.pcm" "-x" "c++" "{{.*}}/Hello.cppm"
|
||||
// CHECK: "-emit-obj" {{.*}}"-main-file-name" "Hello.cppm" {{.*}}"-o" "{{.*}}/output/Hello.o" "-x" "pcm" "{{.*}}/output/Hello.pcm"
|
||||
|
||||
// MULTIPLE-ARCH: option '-fmodule-output' can't be used with multiple arch options
|
||||
// MULTIPLE-ARCH: option '-fmodule-output' cannot be used with multiple arch options
|
||||
|
||||
// CHECK-SPECIFIED: "-emit-module-interface" {{.*}}"-main-file-name" "Hello.cppm" {{.*}}"-o" "{{.*}}/pcm/Hello.pcm" "-x" "c++" "{{.*}}/Hello.cppm"
|
||||
// CHECK-SPECIFIED: "-emit-obj" {{.*}}"-main-file-name" "Hello.cppm" {{.*}}"-o" "{{.*}}/Hello.o" "-x" "pcm" "{{.*}}/pcm/Hello.pcm"
|
||||
|
||||
@ -51,7 +51,7 @@ struct testRecoverStrictnessStruct { };
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum))
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum'}}
|
||||
|
||||
int testRecoverExtraVar = 0;
|
||||
// CHECK-LABEL: VarDecl{{.*}} testRecoverExtraVar
|
||||
@ -188,7 +188,7 @@ struct testSubset7Struct { };
|
||||
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(record(unless(is_union)), function, variable, enum, enum_constant))
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum_constant', and 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum_constant', and 'enum'}}
|
||||
|
||||
int testSubsetRecoverVar;
|
||||
// CHECK-LABEL: VarDecl{{.*}} testSubsetRecoverVar
|
||||
@ -205,7 +205,7 @@ struct testSubsetRecoverStruct { };
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = enum)
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum'}}
|
||||
|
||||
int testSubsetNoVar;
|
||||
// CHECK-LABEL: VarDecl{{.*}} testSubsetNoVar
|
||||
|
||||
@ -44,7 +44,7 @@ void use() {
|
||||
// expected-note@* {{but in 'a' found a different body}}
|
||||
}
|
||||
|
||||
// expected-error@a.cppm:* {{declaration 'foo' attached to named module 'a' can't be attached to other modules}}
|
||||
// expected-error@a.cppm:* {{declaration 'foo' attached to named module 'a' cannot be attached to other modules}}
|
||||
// expected-note@b.cppm:* {{}}
|
||||
|
||||
//--- h.cppm
|
||||
@ -59,5 +59,5 @@ void use() {
|
||||
// expected-note@* {{but in 'a' found a different body}}
|
||||
}
|
||||
|
||||
// expected-error@a.cppm:* {{declaration 'foo' attached to named module 'a' can't be attached to other modules}}
|
||||
// expected-error@a.cppm:* {{declaration 'foo' attached to named module 'a' cannot be attached to other modules}}
|
||||
// expected-note@b.cppm:* {{}}
|
||||
|
||||
@ -32,11 +32,11 @@ void test() {
|
||||
S<int> s;
|
||||
}
|
||||
|
||||
// expected-error@mod1.cppm:* {{declaration 'v' attached to named module 'mod1' can't be attached to other modules}}
|
||||
// expected-error@mod1.cppm:* {{declaration 'v' attached to named module 'mod1' cannot be attached to other modules}}
|
||||
// expected-note@mod2.cppm:* {{}}
|
||||
// expected-error@mod1.cppm:* {{declaration 'func' attached to named module 'mod1' can't be attached to other modules}}
|
||||
// expected-error@mod1.cppm:* {{declaration 'func' attached to named module 'mod1' cannot be attached to other modules}}
|
||||
// expected-note@mod2.cppm:* {{}}
|
||||
// expected-error@mod1.cppm:* {{declaration 'A' attached to named module 'mod1' can't be attached to other modules}}
|
||||
// expected-error@mod1.cppm:* {{declaration 'A' attached to named module 'mod1' cannot be attached to other modules}}
|
||||
// expected-note@mod2.cppm:* {{}}
|
||||
// expected-error@mod1.cppm:* 1+{{declaration 'S' attached to named module 'mod1' can't be attached to other modules}}
|
||||
// expected-error@mod1.cppm:* 1+{{declaration 'S' attached to named module 'mod1' cannot be attached to other modules}}
|
||||
// expected-note@mod2.cppm:* 1+{{}}
|
||||
|
||||
@ -731,7 +731,7 @@ void test_ordered() {
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
#pragma omp parallel
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp for simd' directive}}
|
||||
#pragma omp for simd ordered(1)
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
|
||||
@ -152,7 +152,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp masked taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp masked taskloop simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -152,7 +152,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp master taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp master taskloop simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -638,7 +638,7 @@ void test_ordered() {
|
||||
#pragma omp parallel for simd ordered
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
//expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp parallel for simd' directive}}
|
||||
//expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp parallel for simd' directive}}
|
||||
#pragma omp parallel for simd ordered(1)
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
|
||||
@ -94,7 +94,7 @@ void test_ordered() {
|
||||
#pragma omp parallel for simd ordered
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp parallel for simd' directive}}
|
||||
#pragma omp parallel for simd ordered(1)
|
||||
for (int i = 0; i < 16; ++i)
|
||||
;
|
||||
|
||||
@ -152,7 +152,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp parallel masked taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp parallel masked taskloop simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -152,7 +152,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp parallel master taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp parallel master taskloop simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -142,7 +142,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -29,26 +29,26 @@ T tmain(T argc, S **argv) {
|
||||
#pragma omp target parallel for simd ordered() // expected-error {{expected expression}}
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+2 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+2 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
|
||||
#pragma omp target parallel for simd ordered(argc
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(1)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered((ST > 0) ? 1 + ST : 2)
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+3 {{argument to 'ordered' clause must be a strictly positive integer value}}
|
||||
// expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(foobool(argc)), ordered(true), ordered(-5)
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
@ -60,15 +60,15 @@ T tmain(T argc, S **argv) {
|
||||
#pragma omp target parallel for simd ordered(j = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(1)
|
||||
for (int i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(N)
|
||||
for (T i = ST; i < N; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - ST];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(2)
|
||||
foo();
|
||||
return argc;
|
||||
@ -85,11 +85,11 @@ int main(int argc, char **argv) {
|
||||
#pragma omp target parallel for simd ordered() // expected-error {{expected expression}}
|
||||
for (int i = 4; i < 12; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - 4];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
|
||||
for (int i = 4; i < 12; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - 4];
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(2 + 2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
|
||||
for (int i = 4; i < 12; i++)
|
||||
argv[0][i] = argv[0][i] - argv[0][i - 4];
|
||||
@ -115,7 +115,7 @@ int main(int argc, char **argv) {
|
||||
// expected-error@+2 {{statement after '#pragma omp target parallel for simd' must be a for loop}}
|
||||
#pragma omp target parallel for simd ordered(ordered(tmain < int, char, -1, -2 > (argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}}
|
||||
foo();
|
||||
// expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}}
|
||||
// expected-error@+1 {{'ordered' clause with a parameter cannot be specified in '#pragma omp target parallel for simd' directive}}
|
||||
#pragma omp target parallel for simd ordered(2)
|
||||
foo();
|
||||
return tmain<int, char, 1, 0>(argc, argv);
|
||||
|
||||
@ -152,7 +152,7 @@ template<class I, class C> int foomain(I argc, C **argv) {
|
||||
#pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}}
|
||||
for (int k = 0; k < argc; ++k) ++k;
|
||||
#if defined(OMP52)
|
||||
// omp52-error@+3{{step simple modifier is exclusive and can't be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// omp52-error@+3{{step simple modifier is exclusive and cannot be use with 'val', 'uval' or 'ref' modifier}}
|
||||
// expected-error@+2 {{linear variable with incomplete type 'S1'}}
|
||||
// expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}}
|
||||
#pragma omp taskloop simd linear (a, b: val, B::ib)
|
||||
|
||||
@ -124,7 +124,7 @@ void function();
|
||||
#pragma clang attribute push (__attribute__((annotate)), apply_to=function foo) // expected-error {{extra tokens after attribute in a '#pragma clang attribute push'}}
|
||||
|
||||
#pragma clang attribute push (__attribute__((objc_bridge_related)), apply_to=function)
|
||||
// expected-error@-1 {{attribute 'objc_bridge_related' can't be applied to 'function'}}
|
||||
// expected-error@-1 {{attribute 'objc_bridge_related' cannot be applied to 'function'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((objc_bridge_related(1))), apply_to=function) // expected-error {{expected a related Objective-C class name, e.g., 'NSColor'}}
|
||||
@ -182,15 +182,15 @@ _Pragma("clang attribute pop");
|
||||
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_local))
|
||||
#pragma clang attribute pop
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = function) // expected-error {{attribute 'uninitialized' can't be applied to 'function'}}
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = function) // expected-error {{attribute 'uninitialized' cannot be applied to 'function'}}
|
||||
#pragma clang attribute pop
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable) // expected-error {{attribute 'uninitialized' can't be applied to 'variable'}}
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable) // expected-error {{attribute 'uninitialized' cannot be applied to 'variable'}}
|
||||
#pragma clang attribute pop
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_thread_local)) // expected-error {{attribute 'uninitialized' can't be applied to 'variable(is_thread_local)'}}
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_thread_local)) // expected-error {{attribute 'uninitialized' cannot be applied to 'variable(is_thread_local)'}}
|
||||
#pragma clang attribute pop
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_global)) // expected-error {{attribute 'uninitialized' can't be applied to 'variable(is_global)'}}
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_global)) // expected-error {{attribute 'uninitialized' cannot be applied to 'variable(is_global)'}}
|
||||
#pragma clang attribute pop
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = any(variable(is_parameter), variable(unless(is_parameter)))) // expected-error {{attribute 'uninitialized' can't be applied to 'variable(is_parameter)', and 'variable(unless(is_parameter))'}}
|
||||
#pragma clang attribute push([[clang::uninitialized]], apply_to = any(variable(is_parameter), variable(unless(is_parameter)))) // expected-error {{attribute 'uninitialized' cannot be applied to 'variable(is_parameter)', and 'variable(unless(is_parameter))'}}
|
||||
#pragma clang attribute pop
|
||||
// We're allowed to apply attributes to subsets of allowed subjects.
|
||||
#pragma clang attribute push([[clang::no_destroy]], apply_to = variable)
|
||||
|
||||
@ -36,6 +36,6 @@
|
||||
/*range prohibit_setter=->+0:55*/self.implicitSetter = 0;
|
||||
}
|
||||
// CHECK: 2 'prohibit_setter' results:
|
||||
// CHECK: the selected expression can't be extracted
|
||||
// CHECK: the selected expression cannot be extracted
|
||||
|
||||
@end
|
||||
|
||||
@ -90,7 +90,7 @@ int test7(unsigned long long b) {
|
||||
|
||||
// PR3904
|
||||
void test8(int i) {
|
||||
// A number in an input constraint can't point to a read-write constraint.
|
||||
// A number in an input constraint cannot point to a read-write constraint.
|
||||
asm("" : "+r" (i), "=r"(i) : "0" (i)); // expected-error{{invalid input constraint '0' in asm}}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ void test19(long long x)
|
||||
asm ("" : "=rm" (x): "0" (a)); // expected-error {{unsupported inline asm: input with type 'st_size64' (aka 'struct _st_size64') matching output with type 'long long'}}
|
||||
// FIXME: This case is actually supported by codegen.
|
||||
asm ("" : "=rm" (a): "0" (d)); // expected-error {{unsupported inline asm: input with type 'st_size32' (aka 'struct _st_size32') matching output with type 'st_size64' (aka 'struct _st_size64')}}
|
||||
asm ("" : "=rm" (b): "0" (1)); // expected-error {{impossible constraint in asm: can't store value into a register}}
|
||||
asm ("" : "=rm" (b): "0" (1)); // expected-error {{impossible constraint in asm: cannot store value into a register}}
|
||||
// FIXME: This case should be supported by codegen, but it fails now.
|
||||
asm ("" : "=rm" (e): "0" (1)); // no-error
|
||||
// FIXME: This case should be supported by codegen, but it fails now.
|
||||
|
||||
@ -52,16 +52,16 @@
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum))
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(enum_constant, function, record(unless(is_union)), variable, variable(is_parameter), enum))
|
||||
// FIXME: comma in this diagnostic is wrong.
|
||||
// expected-error@-2 {{attribute 'abi_tag' can't be applied to 'enum_constant', and 'enum'}}
|
||||
// expected-error@-2 {{attribute 'abi_tag' cannot be applied to 'enum_constant', and 'enum'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), enum))
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
// Verify the non-strict subject set verification.
|
||||
@ -96,12 +96,12 @@
|
||||
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(record(unless(is_union)), function, variable, enum, enum_constant))
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum_constant', and 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum_constant', and 'enum'}}
|
||||
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = enum)
|
||||
// expected-error@-1 {{attribute 'abi_tag' can't be applied to 'enum'}}
|
||||
// expected-error@-1 {{attribute 'abi_tag' cannot be applied to 'enum'}}
|
||||
|
||||
#pragma clang attribute pop
|
||||
|
||||
@ -124,21 +124,21 @@
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push(__attribute__((objc_subclassing_restricted)), apply_to = any(objc_interface, objc_protocol))
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' can't be applied to 'objc_protocol'}}
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' cannot be applied to 'objc_protocol'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push(__attribute__((objc_subclassing_restricted)), apply_to = any(objc_protocol))
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' can't be applied to 'objc_protocol'}}
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' cannot be applied to 'objc_protocol'}}
|
||||
// Don't report an error about missing 'objc_interface' as we aren't parsing
|
||||
// Objective-C.
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push(__attribute__((objc_subclassing_restricted)), apply_to = any(objc_interface, objc_protocol))
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' can't be applied to 'objc_protocol'}}
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' cannot be applied to 'objc_protocol'}}
|
||||
#pragma clang attribute pop
|
||||
|
||||
#pragma clang attribute push(__attribute__((objc_subclassing_restricted)), apply_to = any(objc_protocol))
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' can't be applied to 'objc_protocol'}}
|
||||
// expected-error@-1 {{attribute 'objc_subclassing_restricted' cannot be applied to 'objc_protocol'}}
|
||||
// Don't report an error about missing 'objc_interface' as we aren't parsing
|
||||
// Objective-C.
|
||||
#pragma clang attribute pop
|
||||
|
||||
@ -41,7 +41,7 @@ void foo(void)
|
||||
- (void) Meth : (id <NSCopying>)aKey; // expected-note {{passing argument to parameter 'aKey' here}}
|
||||
@end
|
||||
|
||||
@class ForwarClass; // expected-note 3 {{conformance of forward class 'ForwarClass' to protocol 'NSCopying' can not be confirmed}}
|
||||
@class ForwarClass; // expected-note 3 {{conformance of forward class 'ForwarClass' to protocol 'NSCopying' cannot be confirmed}}
|
||||
|
||||
ForwarClass *Test10751015 (I* pi, ForwarClass *ns_forward) {
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ void myRead(read_only image1d_t);
|
||||
#if (__OPENCL_C_VERSION__ == 200) || ((__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300) && defined(__opencl_c_read_write_images))
|
||||
void myReadWrite(read_write image1d_t);
|
||||
#else
|
||||
void myReadWrite(read_write image1d_t); // expected-error {{access qualifier 'read_write' can not be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}}
|
||||
void myReadWrite(read_write image1d_t); // expected-error {{access qualifier 'read_write' cannot be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}}
|
||||
#endif
|
||||
|
||||
|
||||
@ -94,9 +94,9 @@ kernel void k11(read_only write_only image1d_t i){} // expected-error{{multiple
|
||||
kernel void k12(read_only read_only image1d_t i){} // expected-warning {{duplicate 'read_only' declaration specifier}}
|
||||
|
||||
#if (__OPENCL_C_VERSION__ == 200) || ((__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300) && defined(__opencl_c_read_write_images))
|
||||
kernel void k13(read_write pipe int i){} // expected-error{{access qualifier 'read_write' can not be used for 'read_only pipe int'}}
|
||||
kernel void k13(read_write pipe int i){} // expected-error{{access qualifier 'read_write' cannot be used for 'read_only pipe int'}}
|
||||
#else
|
||||
kernel void k13(__read_write image1d_t i){} // expected-error{{access qualifier '__read_write' can not be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}}
|
||||
kernel void k13(__read_write image1d_t i){} // expected-error{{access qualifier '__read_write' cannot be used for '__read_write image1d_t' prior to OpenCL C version 2.0 or in version 3.0 and without __opencl_c_read_write_images feature}}
|
||||
#endif
|
||||
|
||||
#if defined(__OPENCL_C_VERSION__) && __OPENCL_C_VERSION__ < 200
|
||||
@ -116,7 +116,7 @@ kernel void k14(read_only pipe int p) {
|
||||
|
||||
kernel void pipe_ro_twice(read_only read_only pipe int i){} // expected-warning{{duplicate 'read_only' declaration specifier}}
|
||||
// Conflicting access qualifiers
|
||||
kernel void pipe_ro_twice_tw(read_write read_only read_only pipe int i){} // expected-error{{access qualifier 'read_write' can not be used for 'read_only pipe int'}}
|
||||
kernel void pipe_ro_twice_tw(read_write read_only read_only pipe int i){} // expected-error{{access qualifier 'read_write' cannot be used for 'read_only pipe int'}}
|
||||
kernel void pipe_ro_wo(read_only write_only pipe int i){} // expected-error{{multiple access qualifiers}}
|
||||
|
||||
typedef read_only pipe int ROPipeInt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user