[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / PCH / cxx-dependent-sized-ext-vector.cpp
blob93fb56161dfc00e0cbd9bba58ca5800afb238387
1 // RUN: %clang_cc1 -std=c++11 -emit-pch %s -o %t
2 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
4 // RUN: %clang_cc1 -std=c++11 -emit-pch -fpch-instantiate-templates %s -o %t
5 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
7 #ifndef HEADER_INCLUDED
9 #define HEADER_INCLUDED
11 template<typename T, int N>
12 using vec = T __attribute__((ext_vector_type(N)));
14 #else
16 void 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}}
21 #endif