Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / OpenMP / task_depend_template_call_ast_print.cpp
blob2b50eefbcec1fd05caceeb42dd406ad4c28af0d1
1 // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
2 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
3 // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
5 // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
6 // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -fopenmp-simd -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
8 // expected-no-diagnostics
10 #ifndef HEADER
11 #define HEADER
13 template <typename> class vector {
14 public:
15 int &at(long);
18 // CHECK: template <typename T> void foo(int n) {
19 // CHECK-NEXT: vector<T> v;
20 // CHECK-NEXT: vector<int> iv1;
21 // CHECK-NEXT: #pragma omp task depend(iterator(int i = 0:n), in : v.at(i),iv1.at(i))
22 // CHECK-NEXT: ;
23 // CHECK-NEXT: }
25 template <typename T> void foo(int n) {
26 vector<T> v;
27 vector<int> iv1;
28 #pragma omp task depend(iterator(i = 0 : n), in : v.at(i), iv1.at(i))
31 #endif