Alex Lorenz | 00aee43 | 2017-03-22 10:04:48 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 -emit-pch %s -o %t |
2 | // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s | ||||
3 | |||||
4 | #ifndef HEADER_INCLUDED | ||||
5 | |||||
6 | #define HEADER_INCLUDED | ||||
7 | |||||
8 | template<typename T, int N> | ||||
9 | using vec = T __attribute__((ext_vector_type(N))); | ||||
10 | |||||
11 | #else | ||||
12 | |||||
13 | void test() { | ||||
14 | vec<float, 2> a; // expected-error@-5 {{zero vector size}} | ||||
15 | vec<float, 0> b; // expected-note {{in instantiation of template type alias 'vec' requested here}} | ||||
16 | } | ||||
17 | |||||
18 | #endif |