mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-15 23:40:54 +00:00
[Sema] Be consistent about diagnostic wording: always use "cannot".
Discussed with Richard Smith. llvm-svn: 245162
This commit is contained in:
parent
8b2a031cff
commit
32cbff7809
@ -2083,9 +2083,9 @@ def err_attribute_invalid_size : Error<
|
||||
def err_attribute_zero_size : Error<"zero vector size">;
|
||||
def err_attribute_size_too_large : Error<"vector size too large">;
|
||||
def err_typecheck_vector_not_convertable : Error<
|
||||
"can't convert between vector values of different size (%0 and %1)">;
|
||||
"cannot convert between vector values of different size (%0 and %1)">;
|
||||
def err_typecheck_vector_not_convertable_non_scalar : Error<
|
||||
"can't convert between vector and non-scalar values (%0 and %1)">;
|
||||
"cannot convert between vector and non-scalar values (%0 and %1)">;
|
||||
def err_typecheck_vector_lengths_not_equal : Error<
|
||||
"vector operands do not have the same number of elements (%0 and %1)">;
|
||||
def err_ext_vector_component_exceeds_length : Error<
|
||||
@ -2888,7 +2888,7 @@ def err_param_default_argument_on_parameter_pack : Error<
|
||||
"parameter pack cannot have a default argument">;
|
||||
def err_uninitialized_member_for_assign : Error<
|
||||
"cannot define the implicit copy assignment operator for %0, because "
|
||||
"non-static %select{reference|const}1 member %2 can't use copy "
|
||||
"non-static %select{reference|const}1 member %2 cannot use copy "
|
||||
"assignment operator">;
|
||||
def err_uninitialized_member_in_ctor : Error<
|
||||
"%select{|implicit default |inheriting }0constructor for %1 must explicitly "
|
||||
@ -2972,7 +2972,7 @@ def note_ovl_candidate_instantiation_depth : Note<
|
||||
"candidate template ignored: substitution exceeded maximum template "
|
||||
"instantiation depth">;
|
||||
def note_ovl_candidate_underqualified : Note<
|
||||
"candidate template ignored: can't deduce a type for %0 that would "
|
||||
"candidate template ignored: cannot deduce a type for %0 that would "
|
||||
"make %2 equal %1">;
|
||||
def note_ovl_candidate_substitution_failure : Note<
|
||||
"candidate template ignored: substitution failure%0%1">;
|
||||
@ -3262,7 +3262,7 @@ def err_addr_ovl_ambiguous : Error<
|
||||
def err_addr_ovl_not_func_ptrref : Error<
|
||||
"address of overloaded function %0 cannot be converted to type %1">;
|
||||
def err_addr_ovl_no_qualifier : Error<
|
||||
"can't form member pointer of type %0 without '&' and class name">;
|
||||
"cannot form member pointer of type %0 without '&' and class name">;
|
||||
|
||||
// C++11 Literal Operators
|
||||
def err_ovl_no_viable_literal_operator : Error<
|
||||
@ -4556,7 +4556,7 @@ def err_typecheck_arc_assign_self : Error<
|
||||
def err_typecheck_arc_assign_self_class_method : Error<
|
||||
"cannot assign to 'self' in a class method">;
|
||||
def err_typecheck_arr_assign_enumeration : Error<
|
||||
"fast enumeration variables can't be modified in ARC by default; "
|
||||
"fast enumeration variables cannot be modified in ARC by default; "
|
||||
"declare the variable __strong to allow this">;
|
||||
def warn_arc_retained_assign : Warning<
|
||||
"assigning retained object to %select{weak|unsafe_unretained}0 "
|
||||
@ -5370,7 +5370,7 @@ def warn_objc_pointer_cxx_catch_fragile : Warning<
|
||||
"cannot catch an exception thrown with @throw in C++ in the non-unified "
|
||||
"exception model">, InGroup<ObjCNonUnifiedException>;
|
||||
def err_objc_object_catch : Error<
|
||||
"can't catch an Objective-C object by value">;
|
||||
"cannot catch an Objective-C object by value">;
|
||||
def err_incomplete_type_objc_at_encode : Error<
|
||||
"'@encode' of incomplete type %0">;
|
||||
def warn_objc_circular_container : Warning<
|
||||
|
@ -7,7 +7,7 @@ namespace test0 {
|
||||
template<typename T> void g(T);
|
||||
|
||||
void test() {
|
||||
foo(&g<int>); // expected-error-re {{can't form member pointer of type 'void (test0::A::*)(int){{( __attribute__\(\(thiscall\)\))?}}' without '&' and class name}}
|
||||
foo(&g<int>); // expected-error-re {{cannot form member pointer of type 'void (test0::A::*)(int){{( __attribute__\(\(thiscall\)\))?}}' without '&' and class name}}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -180,12 +180,12 @@ namespace member_pointers {
|
||||
{ bool b = &s.g<int>; }
|
||||
|
||||
{ bool b = S::h<42>; }
|
||||
{ bool b = S::h<int>; } // expected-error {{can't form member pointer of type 'bool' without '&' and class name}}
|
||||
{ bool b = S::h<int>; } // expected-error {{cannot form member pointer of type 'bool' without '&' and class name}}
|
||||
{ bool b = &S::h<42>; }
|
||||
{ bool b = &S::h<int>; }
|
||||
{ bool b = s.h<42>; }
|
||||
{ bool b = s.h<int>; } // expected-error {{can't form member pointer of type 'bool' without '&' and class name}}
|
||||
{ bool b = s.h<int>; } // expected-error {{cannot form member pointer of type 'bool' without '&' and class name}}
|
||||
{ bool b = &s.h<42>; }
|
||||
{ bool b = &s.h<int>; } // expected-error {{can't form member pointer of type 'bool' without '&' and class name}}
|
||||
{ bool b = &s.h<int>; } // expected-error {{cannot form member pointer of type 'bool' without '&' and class name}}
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ static void test() {
|
||||
int *ptr;
|
||||
int i;
|
||||
|
||||
vec3 += vec2; // expected-error {{can't convert between vector values of different size}}
|
||||
vec4 += vec3; // expected-error {{can't convert between vector values of different size}}
|
||||
vec3 += vec2; // expected-error {{cannot convert between vector values of different size}}
|
||||
vec4 += vec3; // expected-error {{cannot convert between vector values of different size}}
|
||||
|
||||
vec4 = 5.0f;
|
||||
vec4 = (float4)5.0f;
|
||||
@ -44,11 +44,11 @@ static void test() {
|
||||
vec4 /= 5.2f;
|
||||
vec4 %= 4; // expected-error {{invalid operands to binary expression ('float4' (vector of 4 'float' values) and 'int')}}
|
||||
ivec4 %= 4;
|
||||
ivec4 += vec4; // expected-error {{can't convert between vector values of different size ('int4' (vector of 4 'int' values) and 'float4' (vector of 4 'float' values))}}
|
||||
ivec4 += vec4; // expected-error {{cannot convert between vector values of different size ('int4' (vector of 4 'int' values) and 'float4' (vector of 4 'float' values))}}
|
||||
ivec4 += (int4)vec4;
|
||||
ivec4 -= ivec4;
|
||||
ivec4 |= ivec4;
|
||||
ivec4 += ptr; // expected-error {{can't convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}}
|
||||
ivec4 += ptr; // expected-error {{cannot convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}}
|
||||
}
|
||||
|
||||
typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector element type 'float2' (vector of 2 'float' values)}}
|
||||
@ -102,11 +102,11 @@ static void splats(int i, long l, __uint128_t t, float f, double d) {
|
||||
vs = 65536 + vs; // expected-warning {{implicit conversion from 'int' to 'short8' (vector of 8 'short' values) changes value from 65536 to 0}}
|
||||
vs = vs + i; // expected-warning {{implicit conversion loses integer precision}}
|
||||
vs = vs + 1;
|
||||
vs = vs + 1.f; // expected-error {{can't convert between vector values of different size}}
|
||||
vs = vs + 1.f; // expected-error {{cannot convert between vector values of different size}}
|
||||
|
||||
vi = l + vi; // expected-warning {{implicit conversion loses integer precision}}
|
||||
vi = 1 + vi;
|
||||
vi = vi + 2.0; // expected-error {{can't convert between vector values of different size}}
|
||||
vi = vi + 2.0; // expected-error {{cannot convert between vector values of different size}}
|
||||
vi = vi + 0xffffffff; // expected-warning {{implicit conversion changes signedness}}
|
||||
|
||||
vl = l + vl; // expected-warning {{implicit conversion changes signedness}}
|
||||
|
@ -309,14 +309,14 @@ void foo(void)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
sc = sc + sc2;
|
||||
sc = sc + uc2; // expected-error {{can't convert}}
|
||||
sc = uc + sc2; // expected-error {{can't convert}}
|
||||
sc = sc + uc2; // expected-error {{cannot convert}}
|
||||
sc = uc + sc2; // expected-error {{cannot convert}}
|
||||
sc = sc + bc2;
|
||||
sc = bc + sc2;
|
||||
|
||||
uc = uc + uc2;
|
||||
uc = sc + uc2; // expected-error {{can't convert}}
|
||||
uc = uc + sc2; // expected-error {{can't convert}}
|
||||
uc = sc + uc2; // expected-error {{cannot convert}}
|
||||
uc = uc + sc2; // expected-error {{cannot convert}}
|
||||
uc = bc + uc2;
|
||||
uc = uc + bc2;
|
||||
|
||||
@ -326,14 +326,14 @@ void foo(void)
|
||||
bc = bc + sc2; // expected-error {{incompatible type}}
|
||||
bc = sc + bc2; // expected-error {{incompatible type}}
|
||||
|
||||
sc = sc + sc_scalar; // expected-error {{can't convert}}
|
||||
sc = sc + uc_scalar; // expected-error {{can't convert}}
|
||||
sc = sc_scalar + sc; // expected-error {{can't convert}}
|
||||
sc = uc_scalar + sc; // expected-error {{can't convert}}
|
||||
uc = uc + sc_scalar; // expected-error {{can't convert}}
|
||||
uc = uc + uc_scalar; // expected-error {{can't convert}}
|
||||
uc = sc_scalar + uc; // expected-error {{can't convert}}
|
||||
uc = uc_scalar + uc; // expected-error {{can't convert}}
|
||||
sc = sc + sc_scalar; // expected-error {{cannot convert}}
|
||||
sc = sc + uc_scalar; // expected-error {{cannot convert}}
|
||||
sc = sc_scalar + sc; // expected-error {{cannot convert}}
|
||||
sc = uc_scalar + sc; // expected-error {{cannot convert}}
|
||||
uc = uc + sc_scalar; // expected-error {{cannot convert}}
|
||||
uc = uc + uc_scalar; // expected-error {{cannot convert}}
|
||||
uc = sc_scalar + uc; // expected-error {{cannot convert}}
|
||||
uc = uc_scalar + uc; // expected-error {{cannot convert}}
|
||||
|
||||
ss = ss + ss2;
|
||||
us = us + us2;
|
||||
@ -348,30 +348,30 @@ void foo(void)
|
||||
bl = bl + bl2; // expected-error {{invalid operands}}
|
||||
|
||||
fd = fd + fd2;
|
||||
fd = fd + ul2; // expected-error {{can't convert}}
|
||||
fd = sl + fd2; // expected-error {{can't convert}}
|
||||
fd = fd + ul2; // expected-error {{cannot convert}}
|
||||
fd = sl + fd2; // expected-error {{cannot convert}}
|
||||
|
||||
sc += sc2;
|
||||
sc += uc2; // expected-error {{can't convert}}
|
||||
sc += uc2; // expected-error {{cannot convert}}
|
||||
sc += bc2;
|
||||
|
||||
uc += uc2;
|
||||
uc += sc2; // expected-error {{can't convert}}
|
||||
uc += sc2; // expected-error {{cannot convert}}
|
||||
uc += bc2;
|
||||
|
||||
bc += bc2; // expected-error {{invalid operands}}
|
||||
bc += sc2; // expected-error {{can't convert}}
|
||||
bc += uc2; // expected-error {{can't convert}}
|
||||
bc += sc2; // expected-error {{cannot convert}}
|
||||
bc += uc2; // expected-error {{cannot convert}}
|
||||
|
||||
sc += ss2; // expected-error {{can't convert}}
|
||||
sc += si2; // expected-error {{can't convert}}
|
||||
sc += sl2; // expected-error {{can't convert}}
|
||||
sc += fd2; // expected-error {{can't convert}}
|
||||
sc += ss2; // expected-error {{cannot convert}}
|
||||
sc += si2; // expected-error {{cannot convert}}
|
||||
sc += sl2; // expected-error {{cannot convert}}
|
||||
sc += fd2; // expected-error {{cannot convert}}
|
||||
|
||||
sc += sc_scalar; // expected-error {{can't convert}}
|
||||
sc += uc_scalar; // expected-error {{can't convert}}
|
||||
uc += sc_scalar; // expected-error {{can't convert}}
|
||||
uc += uc_scalar; // expected-error {{can't convert}}
|
||||
sc += sc_scalar; // expected-error {{cannot convert}}
|
||||
sc += uc_scalar; // expected-error {{cannot convert}}
|
||||
uc += sc_scalar; // expected-error {{cannot convert}}
|
||||
uc += uc_scalar; // expected-error {{cannot convert}}
|
||||
|
||||
ss += ss2;
|
||||
us += us2;
|
||||
@ -395,7 +395,7 @@ void foo(void)
|
||||
uc = uc - uc2;
|
||||
bc = bc - bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc = uc - sc2; // expected-error {{can't convert}}
|
||||
sc = uc - sc2; // expected-error {{cannot convert}}
|
||||
sc = sc - bc2;
|
||||
uc = bc - uc2;
|
||||
|
||||
@ -403,9 +403,9 @@ void foo(void)
|
||||
uc -= uc2;
|
||||
bc -= bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc -= uc2; // expected-error {{can't convert}}
|
||||
sc -= uc2; // expected-error {{cannot convert}}
|
||||
uc -= bc2;
|
||||
bc -= sc2; // expected-error {{can't convert}}
|
||||
bc -= sc2; // expected-error {{cannot convert}}
|
||||
|
||||
ss -= ss2;
|
||||
us -= us2;
|
||||
@ -430,17 +430,17 @@ void foo(void)
|
||||
uc = uc * uc2;
|
||||
bc = bc * bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc = uc * sc2; // expected-error {{can't convert}}
|
||||
sc = sc * bc2; // expected-error {{can't convert}}
|
||||
uc = bc * uc2; // expected-error {{can't convert}}
|
||||
sc = uc * sc2; // expected-error {{cannot convert}}
|
||||
sc = sc * bc2; // expected-error {{cannot convert}}
|
||||
uc = bc * uc2; // expected-error {{cannot convert}}
|
||||
|
||||
sc *= sc2;
|
||||
uc *= uc2;
|
||||
bc *= bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc *= uc2; // expected-error {{can't convert}}
|
||||
uc *= bc2; // expected-error {{can't convert}}
|
||||
bc *= sc2; // expected-error {{can't convert}}
|
||||
sc *= uc2; // expected-error {{cannot convert}}
|
||||
uc *= bc2; // expected-error {{cannot convert}}
|
||||
bc *= sc2; // expected-error {{cannot convert}}
|
||||
|
||||
ss *= ss2;
|
||||
us *= us2;
|
||||
@ -464,17 +464,17 @@ void foo(void)
|
||||
uc = uc / uc2;
|
||||
bc = bc / bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc = uc / sc2; // expected-error {{can't convert}}
|
||||
sc = sc / bc2; // expected-error {{can't convert}}
|
||||
uc = bc / uc2; // expected-error {{can't convert}}
|
||||
sc = uc / sc2; // expected-error {{cannot convert}}
|
||||
sc = sc / bc2; // expected-error {{cannot convert}}
|
||||
uc = bc / uc2; // expected-error {{cannot convert}}
|
||||
|
||||
sc /= sc2;
|
||||
uc /= uc2;
|
||||
bc /= bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc /= uc2; // expected-error {{can't convert}}
|
||||
uc /= bc2; // expected-error {{can't convert}}
|
||||
bc /= sc2; // expected-error {{can't convert}}
|
||||
sc /= uc2; // expected-error {{cannot convert}}
|
||||
uc /= bc2; // expected-error {{cannot convert}}
|
||||
bc /= sc2; // expected-error {{cannot convert}}
|
||||
|
||||
ss /= ss2;
|
||||
us /= us2;
|
||||
@ -498,17 +498,17 @@ void foo(void)
|
||||
uc = uc % uc2;
|
||||
bc = bc % bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc = uc % sc2; // expected-error {{can't convert}}
|
||||
sc = sc % bc2; // expected-error {{can't convert}}
|
||||
uc = bc % uc2; // expected-error {{can't convert}}
|
||||
sc = uc % sc2; // expected-error {{cannot convert}}
|
||||
sc = sc % bc2; // expected-error {{cannot convert}}
|
||||
uc = bc % uc2; // expected-error {{cannot convert}}
|
||||
|
||||
sc %= sc2;
|
||||
uc %= uc2;
|
||||
bc %= bc2; // expected-error {{invalid operands}}
|
||||
|
||||
sc %= uc2; // expected-error {{can't convert}}
|
||||
uc %= bc2; // expected-error {{can't convert}}
|
||||
bc %= sc2; // expected-error {{can't convert}}
|
||||
sc %= uc2; // expected-error {{cannot convert}}
|
||||
uc %= bc2; // expected-error {{cannot convert}}
|
||||
bc %= sc2; // expected-error {{cannot convert}}
|
||||
|
||||
ss %= ss2;
|
||||
us %= us2;
|
||||
@ -529,14 +529,14 @@ void foo(void)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
sc = sc & sc2;
|
||||
sc = sc & uc2; // expected-error {{can't convert}}
|
||||
sc = uc & sc2; // expected-error {{can't convert}}
|
||||
sc = sc & uc2; // expected-error {{cannot convert}}
|
||||
sc = uc & sc2; // expected-error {{cannot convert}}
|
||||
sc = sc & bc2;
|
||||
sc = bc & sc2;
|
||||
|
||||
uc = uc & uc2;
|
||||
uc = sc & uc2; // expected-error {{can't convert}}
|
||||
uc = uc & sc2; // expected-error {{can't convert}}
|
||||
uc = sc & uc2; // expected-error {{cannot convert}}
|
||||
uc = uc & sc2; // expected-error {{cannot convert}}
|
||||
uc = bc & uc2;
|
||||
uc = uc & bc2;
|
||||
|
||||
@ -553,25 +553,25 @@ void foo(void)
|
||||
fd = fd & ul2; // expected-error {{invalid operands}}
|
||||
|
||||
sc &= sc2;
|
||||
sc &= uc2; // expected-error {{can't convert}}
|
||||
sc &= uc2; // expected-error {{cannot convert}}
|
||||
sc &= bc2;
|
||||
|
||||
uc &= uc2;
|
||||
uc &= sc2; // expected-error {{can't convert}}
|
||||
uc &= sc2; // expected-error {{cannot convert}}
|
||||
uc &= bc2;
|
||||
|
||||
bc &= bc2;
|
||||
bc &= sc2; // expected-error {{can't convert}}
|
||||
bc &= uc2; // expected-error {{can't convert}}
|
||||
bc &= sc2; // expected-error {{cannot convert}}
|
||||
bc &= uc2; // expected-error {{cannot convert}}
|
||||
|
||||
sc &= ss2; // expected-error {{can't convert}}
|
||||
sc &= si2; // expected-error {{can't convert}}
|
||||
sc &= sl2; // expected-error {{can't convert}}
|
||||
sc &= ss2; // expected-error {{cannot convert}}
|
||||
sc &= si2; // expected-error {{cannot convert}}
|
||||
sc &= sl2; // expected-error {{cannot convert}}
|
||||
sc &= fd2; // expected-error {{invalid operands}}
|
||||
|
||||
us &= bc2; // expected-error {{can't convert}}
|
||||
ui &= bc2; // expected-error {{can't convert}}
|
||||
ul &= bc2; // expected-error {{can't convert}}
|
||||
us &= bc2; // expected-error {{cannot convert}}
|
||||
ui &= bc2; // expected-error {{cannot convert}}
|
||||
ul &= bc2; // expected-error {{cannot convert}}
|
||||
fd &= bc2; // expected-error {{invalid operands}}
|
||||
|
||||
ss &= ss2;
|
||||
@ -591,11 +591,11 @@ void foo(void)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
sc = sc | sc2;
|
||||
sc = sc | uc2; // expected-error {{can't convert}}
|
||||
sc = sc | uc2; // expected-error {{cannot convert}}
|
||||
sc = sc | bc2;
|
||||
|
||||
uc = uc | uc2;
|
||||
uc = sc | uc2; // expected-error {{can't convert}}
|
||||
uc = sc | uc2; // expected-error {{cannot convert}}
|
||||
uc = bc | uc2;
|
||||
|
||||
bc = bc | bc2;
|
||||
@ -625,11 +625,11 @@ void foo(void)
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
sc = sc ^ sc2;
|
||||
sc = sc ^ uc2; // expected-error {{can't convert}}
|
||||
sc = sc ^ uc2; // expected-error {{cannot convert}}
|
||||
sc = sc ^ bc2;
|
||||
|
||||
uc = uc ^ uc2;
|
||||
uc = sc ^ uc2; // expected-error {{can't convert}}
|
||||
uc = sc ^ uc2; // expected-error {{cannot convert}}
|
||||
uc = bc ^ uc2;
|
||||
|
||||
bc = bc ^ bc2;
|
||||
@ -862,10 +862,10 @@ void foo(void)
|
||||
(void)(uc == uc2);
|
||||
(void)(bc == bc2);
|
||||
|
||||
(void)(sc == uc); // expected-error {{can't convert}}
|
||||
(void)(sc == uc); // expected-error {{cannot convert}}
|
||||
(void)(sc == bc);
|
||||
|
||||
(void)(uc == sc); // expected-error {{can't convert}}
|
||||
(void)(uc == sc); // expected-error {{cannot convert}}
|
||||
(void)(uc == bc);
|
||||
|
||||
(void)(bc == sc);
|
||||
@ -884,8 +884,8 @@ void foo(void)
|
||||
(void)(bl == bl2);
|
||||
(void)(fd == fd2);
|
||||
|
||||
(void)(fd == ul); // expected-error {{can't convert}}
|
||||
(void)(ul == fd); // expected-error {{can't convert}}
|
||||
(void)(fd == ul); // expected-error {{cannot convert}}
|
||||
(void)(ul == fd); // expected-error {{cannot convert}}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Test that == rules apply to != too.
|
||||
@ -895,7 +895,7 @@ void foo(void)
|
||||
(void)(uc != uc2);
|
||||
(void)(bc != bc2);
|
||||
|
||||
(void)(sc != uc); // expected-error {{can't convert}}
|
||||
(void)(sc != uc); // expected-error {{cannot convert}}
|
||||
(void)(sc != bc);
|
||||
|
||||
(void)(ss != ss2);
|
||||
@ -919,7 +919,7 @@ void foo(void)
|
||||
(void)(uc <= uc2);
|
||||
(void)(bc <= bc2);
|
||||
|
||||
(void)(sc <= uc); // expected-error {{can't convert}}
|
||||
(void)(sc <= uc); // expected-error {{cannot convert}}
|
||||
(void)(sc <= bc);
|
||||
|
||||
(void)(ss <= ss2);
|
||||
@ -943,7 +943,7 @@ void foo(void)
|
||||
(void)(uc >= uc2);
|
||||
(void)(bc >= bc2);
|
||||
|
||||
(void)(sc >= uc); // expected-error {{can't convert}}
|
||||
(void)(sc >= uc); // expected-error {{cannot convert}}
|
||||
(void)(sc >= bc);
|
||||
|
||||
(void)(ss >= ss2);
|
||||
@ -967,7 +967,7 @@ void foo(void)
|
||||
(void)(uc < uc2);
|
||||
(void)(bc < bc2);
|
||||
|
||||
(void)(sc < uc); // expected-error {{can't convert}}
|
||||
(void)(sc < uc); // expected-error {{cannot convert}}
|
||||
(void)(sc < bc);
|
||||
|
||||
(void)(ss < ss2);
|
||||
@ -991,7 +991,7 @@ void foo(void)
|
||||
(void)(uc > uc2);
|
||||
(void)(bc > bc2);
|
||||
|
||||
(void)(sc > uc); // expected-error {{can't convert}}
|
||||
(void)(sc > uc); // expected-error {{cannot convert}}
|
||||
(void)(sc > bc);
|
||||
|
||||
(void)(ss > ss2);
|
||||
|
@ -1,12 +1,12 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
|
||||
class Base { // expected-error {{cannot define the implicit copy assignment operator for 'Base', because non-static reference member 'ref' can't use copy assignment operator}} \
|
||||
class Base { // expected-error {{cannot define the implicit copy assignment operator for 'Base', because non-static reference member 'ref' cannot use copy assignment operator}} \
|
||||
// expected-warning{{class 'Base' does not declare any constructor to initialize its non-modifiable members}}
|
||||
int &ref; // expected-note {{declared here}} \
|
||||
// expected-note{{reference member 'ref' will never be initialized}}
|
||||
};
|
||||
|
||||
class X : Base { // // expected-error {{cannot define the implicit copy assignment operator for 'X', because non-static const member 'cint' can't use copy assignment operator}} \
|
||||
class X : Base { // // expected-error {{cannot define the implicit copy assignment operator for 'X', because non-static const member 'cint' cannot use copy assignment operator}} \
|
||||
// expected-note{{assignment operator for 'Base' first required here}}
|
||||
public:
|
||||
X();
|
||||
@ -73,7 +73,7 @@ void i() {
|
||||
|
||||
// Test5
|
||||
|
||||
class E1 { // expected-error{{cannot define the implicit copy assignment operator for 'E1', because non-static const member 'a' can't use copy assignment operator}}
|
||||
class E1 { // expected-error{{cannot define the implicit copy assignment operator for 'E1', because non-static const member 'a' cannot use copy assignment operator}}
|
||||
|
||||
public:
|
||||
const int a; // expected-note{{declared here}}
|
||||
|
@ -59,10 +59,10 @@ void f() {
|
||||
struct testvec {
|
||||
__v2si v;
|
||||
void madd(const testvec& rhs) {
|
||||
v = v + rhs; // expected-error {{can't convert between vector and non-scalar values}}
|
||||
v = v + rhs; // expected-error {{cannot convert between vector and non-scalar values}}
|
||||
}
|
||||
void madd2(testvec rhs) {
|
||||
v = v + rhs; // expected-error {{can't convert between vector and non-scalar values}}
|
||||
v = v + rhs; // expected-error {{cannot convert between vector and non-scalar values}}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,6 @@ typedef int __attribute__((vector_size (16))) vSInt32;
|
||||
|
||||
vSInt32 foo (vUInt32 a) {
|
||||
vSInt32 b = { 0, 0, 0, 0 };
|
||||
b += a; // expected-error{{can't convert between vector values}}
|
||||
b += a; // expected-error{{cannot convert between vector values}}
|
||||
return b;
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ void test11(id op, void *vp) {
|
||||
|
||||
void test12(id collection) {
|
||||
for (id x in collection) {
|
||||
x = 0; // expected-error {{fast enumeration variables can't be modified in ARC by default; declare the variable __strong to allow this}}
|
||||
x = 0; // expected-error {{fast enumeration variables cannot be modified in ARC by default; declare the variable __strong to allow this}}
|
||||
}
|
||||
|
||||
for (const id x in collection) { // expected-note {{variable 'x' declared const here}}
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace test0 {
|
||||
void test() {
|
||||
try {
|
||||
} catch (NSException e) { // expected-error {{can't catch an Objective-C object by value}}
|
||||
} catch (NSException e) { // expected-error {{cannot catch an Objective-C object by value}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,12 +84,12 @@ uchar2 ntest03(int2 C, uchar X, uchar Y)
|
||||
|
||||
float2 ntest04(int2 C, int2 X, float2 Y)
|
||||
{
|
||||
return C ? X : Y; // expected-error {{can't convert between vector values of different size ('int2' (vector of 2 'int' values) and 'float2' (vector of 2 'float' values))}}
|
||||
return C ? X : Y; // expected-error {{cannot convert between vector values of different size ('int2' (vector of 2 'int' values) and 'float2' (vector of 2 'float' values))}}
|
||||
}
|
||||
|
||||
float2 ntest05(int2 C, int2 X, float Y)
|
||||
{
|
||||
return C ? X : Y; // expected-error {{can't convert between vector values of different size ('int2' (vector of 2 'int' values) and 'float')}}
|
||||
return C ? X : Y; // expected-error {{cannot convert between vector values of different size ('int2' (vector of 2 'int' values) and 'float')}}
|
||||
}
|
||||
|
||||
char2 ntest06(int2 C, char2 X, char2 Y)
|
||||
@ -115,7 +115,7 @@ int2 ntest09(int2 C, global int *X, global int *Y)
|
||||
|
||||
char3 ntest10(char C, char3 X, char2 Y)
|
||||
{
|
||||
return C ? X : Y; // expected-error {{can't convert between vector values of different size ('char3' (vector of 3 'char' values) and 'char2' (vector of 2 'char' values))}}
|
||||
return C ? X : Y; // expected-error {{cannot convert between vector values of different size ('char3' (vector of 3 'char' values) and 'char2' (vector of 2 'char' values))}}
|
||||
}
|
||||
|
||||
char3 ntest11(char2 C, char3 X, char Y)
|
||||
|
@ -107,7 +107,7 @@ namespace PR7463 {
|
||||
}
|
||||
|
||||
namespace test0 {
|
||||
template <class T> void make(const T *(*fn)()); // expected-note {{candidate template ignored: can't deduce a type for 'T' that would make 'const T' equal 'char'}}
|
||||
template <class T> void make(const T *(*fn)()); // expected-note {{candidate template ignored: cannot deduce a type for 'T' that would make 'const T' equal 'char'}}
|
||||
char *char_maker();
|
||||
void test() {
|
||||
make(char_maker); // expected-error {{no matching function for call to 'make'}}
|
||||
|
@ -4,8 +4,8 @@
|
||||
template<typename T> class vector2 {};
|
||||
template<typename T> class vector : vector2<T> {};
|
||||
|
||||
template<typename T> void Foo2(vector2<const T*> V) {} // expected-note{{candidate template ignored: can't deduce a type for 'T' that would make 'const T' equal 'int'}}
|
||||
template<typename T> void Foo(vector<const T*> V) {} // expected-note {{candidate template ignored: can't deduce a type for 'T' that would make 'const T' equal 'int'}}
|
||||
template<typename T> void Foo2(vector2<const T*> V) {} // expected-note{{candidate template ignored: cannot deduce a type for 'T' that would make 'const T' equal 'int'}}
|
||||
template<typename T> void Foo(vector<const T*> V) {} // expected-note {{candidate template ignored: cannot deduce a type for 'T' that would make 'const T' equal 'int'}}
|
||||
|
||||
void test() {
|
||||
Foo2(vector2<int*>()); // expected-error{{no matching function for call to 'Foo2'}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user