// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one() { #pragma omp ordered ; } void test_two(int x) { #pragma omp for ordered for (int i = 0; i < x; i++) ; } void test_three(int x) { #pragma omp for ordered(1) for (int i = 0; i < x; i++) { #pragma omp ordered depend(source) } } // CHECK: TranslationUnitDecl {{.*}} <> // CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-ordered.c:3:1, line:6:1> line:3:6 test_one 'void ()' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPOrderedDirective {{.*}} // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | `-CapturedDecl {{.*}} <> // CHECK-NEXT: | |-NullStmt {{.*}} // CHECK-NEXT: | `-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-ordered.c:4:1) *const restrict' // CHECK-NEXT: |-FunctionDecl {{.*}} line:8:6 test_two 'void (int)' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPForDirective {{.*}} // CHECK-NEXT: | |-OMPOrderedClause {{.*}} // CHECK-NEXT: | | `-<<>> // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | |-CapturedDecl {{.*}} <> // CHECK-NEXT: | | |-ForStmt {{.*}} // CHECK-NEXT: | | | |-DeclStmt {{.*}} // CHECK-NEXT: | | | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | | | |-<<>> // CHECK-NEXT: | | | |-BinaryOperator {{.*}} 'int' '<' // CHECK-NEXT: | | | | |-ImplicitCastExpr {{.*}} 'int' // CHECK-NEXT: | | | | | `-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | | `-ImplicitCastExpr {{.*}} 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | | |-UnaryOperator {{.*}} 'int' postfix '++' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | `-NullStmt {{.*}} // CHECK-NEXT: | | |-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-ordered.c:9:1) *const restrict' // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6 test_three 'void (int)' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPForDirective {{.*}} // CHECK-NEXT: |-OMPOrderedClause {{.*}} // CHECK-NEXT: | `-ConstantExpr {{.*}} 'int' // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: `-CapturedStmt {{.*}} // CHECK-NEXT: |-CapturedDecl {{.*}} <> // CHECK-NEXT: | |-ForStmt {{.*}} // CHECK-NEXT: | | |-DeclStmt {{.*}} // CHECK-NEXT: | | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | | |-<<>> // CHECK-NEXT: | | |-BinaryOperator {{.*}} 'int' '<' // CHECK-NEXT: | | | |-ImplicitCastExpr {{.*}} 'int' // CHECK-NEXT: | | | | `-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} 'int' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | | |-UnaryOperator {{.*}} 'int' postfix '++' // CHECK-NEXT: | | | `-DeclRefExpr {{.*}} 'int' lvalue Var {{.*}} 'i' 'int' // CHECK-NEXT: | | `-CompoundStmt {{.*}} // CHECK-NEXT: | | `-OMPOrderedDirective {{.*}} openmp_standalone_directive // CHECK-NEXT: | | `-OMPDependClause {{.*}} > // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-ordered.c:15:1) *const restrict' // CHECK-NEXT: | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'