diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-19 22:10:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-19 22:10:17 +0000 |
commit | cde01739dffe574c53a6ba1def1a57a2cc7b4a8b (patch) | |
tree | 54b9645e4b7dc65cf487b39484415dd66dff0ad6 /test/SemaTemplate/instantiate-expr-3.cpp | |
parent | d1f22e1f73b67116393720739d3ab8116ae301bc (diff) |
Template instantiation for __builtin_shufflevector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/instantiate-expr-3.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-expr-3.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-3.cpp b/test/SemaTemplate/instantiate-expr-3.cpp index bc1097c5aa..a17897b085 100644 --- a/test/SemaTemplate/instantiate-expr-3.cpp +++ b/test/SemaTemplate/instantiate-expr-3.cpp @@ -81,3 +81,19 @@ struct TypesCompatible0 { }; template struct TypesCompatible0<int, const int, true>; + +// --------------------------------------------------------------------- +// __builtin_shufflevector +// --------------------------------------------------------------------- +typedef __attribute__(( ext_vector_type(2) )) double double2; +template<typename T, typename U, int N, int M> +struct ShuffleVector0 { + void f(T t, U u, double2 a, double2 b) { + (void)__builtin_shufflevector(t, u, N, M); // expected-error{{index}} + (void)__builtin_shufflevector(a, b, N, M); + (void)__builtin_shufflevector(a, b, 2, 1); + } +}; + +template struct ShuffleVector0<double2, double2, 2, 1>; +template struct ShuffleVector0<double2, double2, 4, 3>; // expected-note{{instantiation}} |