clang/test/OpenMP/nothing_ast_print.cpp
raw| 1 | // RUN: %clang_cc1 -fopenmp -ast-print %s | FileCheck %s --check-prefix=PRINT |
| 2 | // RUN: %clang_cc1 -ast-print %s | FileCheck %s --check-prefix=PRINT |
| 3 | |
| 4 | // Checks whether the `if` body looks same with and without OpenMP enabled |
| 5 | |
| 6 | void foo() { |
| 7 | return; |
| 8 | } |
| 9 | |
| 10 | int main() { |
| 11 | int x = 3; |
| 12 | if (x % 2 == 0) |
| 13 | #pragma omp nothing |
| 14 | foo(); |
| 15 | |
| 16 | return 0; |
| 17 | // PRINT: if (x % 2 == 0) |
| 18 | // PRINT: foo(); |
| 19 | // PRINT: return 0; |
| 20 | } |