| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| template<typename T, unsigned Length> |
| typedef T __attribute__((ext_vector_type(Length))) type; |
| template<typename T, unsigned Length> |
| typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{zero vector size}} |
| make2<int, 0> x; // expected-note{{in instantiation of}} |
| template<typename T, unsigned Length> |
| typedef T __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type 'struct s'}} |
| make3<s, 3>x; // expected-note{{in instantiation of}} |
| template<typename T, T Length> |
| typedef T __attribute__((ext_vector_type(Length))) type; |
| template<unsigned Length> |
| typedef int_ptr __attribute__((ext_vector_type(Length))) type; // expected-error{{invalid vector type}} |
| typedef int __attribute__((ext_vector_type(Length))) type; |
| y.w = -1; // expected-error{{vector component access exceeds type}} |