[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / OpenMP / assumes_print.cpp
bloba7f04edb3b1af49d4ce802cb79d6aa25be3c2a81
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 void foo() {
16 #pragma omp assumes no_openmp_routines
18 namespace inner {
19 #pragma omp assumes no_openmp
20 } // namespace inner
22 #pragma omp begin assumes ext_range_bar_only
24 #pragma omp begin assumes ext_range_bar_only_2
26 void bar() {
29 #pragma omp end assumes
30 #pragma omp end assumes
32 #pragma omp begin assumes ext_not_seen
33 #pragma omp end assumes
35 #pragma omp begin assumes ext_1234
36 void baz() {
38 #pragma omp end assumes
40 // CHECK: __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void foo()
41 // CHECK: __attribute__((assume("ompx_range_bar_only"))) __attribute__((assume("ompx_range_bar_only_2"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void bar()
42 // CHECK: __attribute__((assume("ompx_1234"))) __attribute__((assume("omp_no_openmp_routines"))) __attribute__((assume("omp_no_openmp"))) void baz()
44 #endif