aboutsummaryrefslogtreecommitdiff
path: root/test/Misc/ast-print-pragmas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Misc/ast-print-pragmas.cpp')
-rw-r--r--test/Misc/ast-print-pragmas.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Misc/ast-print-pragmas.cpp b/test/Misc/ast-print-pragmas.cpp
index 25421fcd0c3e..23f533fc3766 100644
--- a/test/Misc/ast-print-pragmas.cpp
+++ b/test/Misc/ast-print-pragmas.cpp
@@ -38,3 +38,18 @@ void test(int *List, int Length) {
i++;
}
}
+
+template <int V, int I>
+void test_nontype_template_param(int *List, int Length) {
+#pragma clang loop vectorize_width(V) interleave_count(I)
+ for (int i = 0; i < Length; i++) {
+ List[i] = i;
+ }
+}
+
+// CHECK: #pragma clang loop interleave_count(I)
+// CHECK: #pragma clang loop vectorize_width(V)
+
+void test_templates(int *List, int Length) {
+ test_nontype_template_param<2, 4>(List, Length);
+}