22 lines · cpp
1// RUN: %clang_cc1 -std=c++11 -emit-pch %s -o %t2// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s3 4// RUN: %clang_cc1 -std=c++11 -emit-pch -fpch-instantiate-templates %s -o %t5// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s6 7#ifndef HEADER_INCLUDED8 9#define HEADER_INCLUDED10 11template<typename T, int N>12using vec = T __attribute__((ext_vector_type(N)));13 14#else15 16void test() {17 vec<float, 2> a; // expected-error@-5 {{zero vector size}}18 vec<float, 0> b; // expected-note {{in instantiation of template type alias 'vec' requested here}}19}20 21#endif22