Template instantiation for __builtin_shufflevector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72139 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-expr-3.cpp b/test/SemaTemplate/instantiate-expr-3.cpp
index bc1097c..a17897b 100644
--- a/test/SemaTemplate/instantiate-expr-3.cpp
+++ b/test/SemaTemplate/instantiate-expr-3.cpp
@@ -81,3 +81,19 @@
 };
 
 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}}