[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / OpenMP / assume_nesting.cpp
blob2a86a5d6b7456f427f28ad1d009b0921613cb8b2
1 // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -ast-print %s | FileCheck %s
2 // expected-no-diagnostics
4 extern void bar();
6 void foo()
8 #pragma omp assume no_openmp_routines
9 // CHECK: omp assume no_openmp_routines
11 #pragma omp assume no_parallelism
12 // CHECK: omp assume no_parallelism
16 #pragma omp target
17 // CHECK: omp target
19 #pragma omp assume holds(1==1)
20 // CHECK: omp assume holds(1 == 1)
24 #pragma omp assume no_parallelism
25 // CHECK: omp assume no_parallelism
27 #pragma omp target
28 // CHECK: omp target
32 #pragma omp assume absent(parallel)
33 // CHECK: omp assume absent(parallel)
35 #pragma omp assume contains(target, loop)
36 // CHECK: omp assume contains(target, loop)
38 #pragma omp assume holds(1==1)
39 // CHECK: omp assume holds(1 == 1)
41 #pragma omp assume absent(teams)
42 // CHECK: omp assume absent(teams)
44 #pragma omp assume no_openmp_routines
45 // CHECK: omp assume no_openmp_routines
47 bar();