aboutsummaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/nothing_ast_print.cpp
blob: a16f95044b60d699985f96c8b164033a5a15ee0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fopenmp -ast-print %s | FileCheck %s --check-prefix=PRINT
// RUN: %clang_cc1 -ast-print %s | FileCheck %s --check-prefix=PRINT

// Checks whether the `if` body looks same with and without OpenMP enabled

void foo() {
    return;
}

int main() {
    int x = 3;
    if (x % 2 == 0)
        #pragma omp nothing
    foo();

    return 0;
// PRINT: if (x % 2 == 0)
// PRINT:    foo();
// PRINT: return 0;
}