From fdb3d9b8d6b2378aaef5a4363ec8c3c45e77ebf7 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Wed, 20 Mar 2019 16:31:47 +0000 Subject: [NFC][clang][astdump] Some baseline tests for OpenMP Summary: Split off from D59214. Not a fully exhaustive test coverage, but better than what there currently is. Differential Revision: https://reviews.llvm.org/D59306 llvm-svn: 356569 --- clang/test/AST/ast-dump-openmp-target-update.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 clang/test/AST/ast-dump-openmp-target-update.c (limited to 'clang/test/AST/ast-dump-openmp-target-update.c') diff --git a/clang/test/AST/ast-dump-openmp-target-update.c b/clang/test/AST/ast-dump-openmp-target-update.c new file mode 100644 index 00000000000..07b0da8afad --- /dev/null +++ b/clang/test/AST/ast-dump-openmp-target-update.c @@ -0,0 +1,23 @@ +// 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(int x) { +#pragma omp target update to(x) +} + +// CHECK: TranslationUnitDecl {{.*}} <> +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-update.c:3:1, line:5:1> line:3:6 test 'void (int)' +// CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used x 'int' +// CHECK-NEXT: `-CompoundStmt {{.*}} +// CHECK-NEXT: `-OMPTargetUpdateDirective {{.*}} +// CHECK-NEXT: |-OMPToClause {{.*}} +// CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' +// CHECK-NEXT: `-CapturedStmt {{.*}} +// CHECK-NEXT: `-CapturedDecl {{.*}} <> nothrow +// CHECK-NEXT: |-CompoundStmt {{.*}} +// CHECK-NEXT: |-AlwaysInlineAttr {{.*}} <> Implicit __forceinline +// CHECK-NEXT: |-ImplicitParamDecl {{.*}} col:9 implicit .global_tid. 'const int' +// CHECK-NEXT: |-ImplicitParamDecl {{.*}} col:9 implicit .part_id. 'const int *const restrict' +// CHECK-NEXT: |-ImplicitParamDecl {{.*}} col:9 implicit .privates. 'void *const restrict' +// CHECK-NEXT: |-ImplicitParamDecl {{.*}} col:9 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)' +// CHECK-NEXT: |-ImplicitParamDecl {{.*}} col:9 implicit .task_t. 'void *const' +// CHECK-NEXT: `-ImplicitParamDecl {{.*}} col:9 implicit __context 'struct (anonymous at {{.*}}ast-dump-openmp-target-update.c:4:9) *const restrict' -- cgit v1.2.3