diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-03-22 10:04:48 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-03-22 10:04:48 +0000 |
commit | 0a670240d620f03b528d569c5c09ade4c1fefe55 (patch) | |
tree | ae8ca2e4dc78a300c1d4905ec0bd5b050c228005 /test/PCH | |
parent | 4db37b682d05e075757eb3b75d77cd14f51b1313 (diff) |
[Serialization] Serialize DependentSizedExtVectorType
rdar://30659700
Differential Revision: https://reviews.llvm.org/D31134
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/cxx-dependent-sized-ext-vector.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/PCH/cxx-dependent-sized-ext-vector.cpp b/test/PCH/cxx-dependent-sized-ext-vector.cpp new file mode 100644 index 0000000000..29c06f7cc7 --- /dev/null +++ b/test/PCH/cxx-dependent-sized-ext-vector.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++11 -emit-pch %s -o %t +// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s + +#ifndef HEADER_INCLUDED + +#define HEADER_INCLUDED + +template<typename T, int N> +using vec = T __attribute__((ext_vector_type(N))); + +#else + +void test() { + vec<float, 2> a; // expected-error@-5 {{zero vector size}} + vec<float, 0> b; // expected-note {{in instantiation of template type alias 'vec' requested here}} +} + +#endif |