зеркало из https://github.com/microsoft/clang-1.git
Clean up the diagnostic complaining about the element type of a vector
type so that it actually complains about the element type itself. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
90cd672ed1
Коммит
27cac99064
|
@ -815,7 +815,7 @@ def err_attribute_wrong_number_arguments : Error<
|
|||
"attribute requires %0 argument(s)">;
|
||||
def err_attribute_missing_parameter_name : Error<
|
||||
"attribute requires unquoted parameter">;
|
||||
def err_attribute_invalid_vector_type : Error<"invalid vector type %0">;
|
||||
def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
|
||||
def err_attribute_argument_not_int : Error<
|
||||
"'%0' attribute requires integer constant">;
|
||||
def err_attribute_argument_outof_range : Error<
|
||||
|
|
|
@ -44,7 +44,7 @@ static void test() {
|
|||
ivec4 += ptr; // expected-error {{can't convert between vector values of different size ('int4' and 'int *')}}
|
||||
}
|
||||
|
||||
typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector type 'float2'}}
|
||||
typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector element type 'float2'}}
|
||||
|
||||
void inc(float2 f2) {
|
||||
f2++; // expected-error{{cannot increment value of type 'float2'}}
|
||||
|
|
|
@ -36,4 +36,4 @@ _Decimal32 x; // expected-error {{GNU decimal type extension not supported}}
|
|||
|
||||
|
||||
// rdar://6880951
|
||||
int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{invalid vector type}}
|
||||
int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{invalid vector element type}}
|
||||
|
|
|
@ -20,7 +20,7 @@ int test_make2() {
|
|||
|
||||
template<typename T, unsigned Length>
|
||||
struct make3 {
|
||||
typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type 's'}}
|
||||
typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector element type 's'}}
|
||||
};
|
||||
|
||||
struct s {};
|
||||
|
@ -42,7 +42,7 @@ int test_make4() {
|
|||
typedef int* int_ptr;
|
||||
template<unsigned Length>
|
||||
struct make5 {
|
||||
typedef int_ptr __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type}}
|
||||
typedef int_ptr __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector element type}}
|
||||
};
|
||||
|
||||
template<int Length>
|
||||
|
|
Загрузка…
Ссылка в новой задаче