From 84348cdba11c17c66abfde590d83a4710c7f9679 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 6 Dec 2018 22:51:51 +0000 Subject: [PATCH] Use relative line offsets in test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348541 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/AST/dump.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/AST/dump.cpp b/test/AST/dump.cpp index c053002fbc..6d7029d73d 100644 --- a/test/AST/dump.cpp +++ b/test/AST/dump.cpp @@ -13,7 +13,7 @@ int ga, gb; #pragma omp declare reduction(fun : float : omp_out += omp_in) initializer(omp_priv = omp_orig + 15) -// CHECK: |-OMPDeclareReductionDecl {{.+}} col:35 operator+ 'int' combiner +// CHECK: |-OMPDeclareReductionDecl {{.+}} col:35 operator+ 'int' combiner // CHECK-NEXT: | |-CompoundAssignOperator {{.+}} 'int' lvalue '*=' ComputeLHSTy='int' ComputeResultTy='int' // CHECK-NEXT: | | |-DeclRefExpr {{.+}} 'int' lvalue Var {{.+}} 'omp_out' 'int' // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'int' @@ -28,7 +28,7 @@ int ga, gb; // CHECK-NEXT: | | `-DeclRefExpr {{.+}} 'char' lvalue Var {{.+}} 'omp_in' 'char' // CHECK-NEXT: | |-VarDecl {{.+}} col:40 implicit used omp_in 'char' // CHECK-NEXT: | `-VarDecl {{.+}} col:40 implicit used omp_out 'char' -// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:37 fun 'float' combiner initializer +// CHECK-NEXT: |-OMPDeclareReductionDecl {{.+}} col:37 fun 'float' combiner initializer // CHECK-NEXT: | |-CompoundAssignOperator {{.+}} 'float' lvalue '+=' ComputeLHSTy='float' ComputeResultTy='float' // CHECK-NEXT: | | |-DeclRefExpr {{.+}} 'float' lvalue Var {{.+}} 'omp_out' 'float' // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'float' @@ -60,19 +60,19 @@ struct S { // CHECK-NEXT: | |-OMPScheduleClause {{.+}} // CHECK-NEXT: | | `-ImplicitCastExpr {{.+}} 'int' // CHECK-NEXT: | | `-DeclRefExpr {{.+}} 'int' lvalue OMPCapturedExpr {{.+}} '.capture_expr.' 'int' -// CHECK-NEXT: | `-CapturedStmt {{.+}} +// CHECK-NEXT: | `-CapturedStmt {{.+}} // CHECK-NEXT: | |-CapturedDecl {{.+}} <> -// CHECK-NEXT: | | |-ForStmt {{.+}} -// CHECK: | | | `-UnaryOperator {{.+}} 'int' lvalue prefix '++' +// CHECK-NEXT: | | |-ForStmt {{.+}} +// CHECK: | | | `-UnaryOperator {{.+}} 'int' lvalue prefix '++' // CHECK-NEXT: | | | `-DeclRefExpr {{.+}} 'int' lvalue OMPCapturedExpr {{.+}} 'a' 'int &' #pragma omp declare simd #pragma omp declare simd inbranch void foo(); -// CHECK: |-FunctionDecl {{.+}} col:6 foo 'void ()' -// CHECK-NEXT: |-OMPDeclareSimdDeclAttr {{.+}} Implicit BS_Inbranch -// CHECK: `-OMPDeclareSimdDeclAttr {{.+}} Implicit BS_Undefined +// CHECK: |-FunctionDecl {{.+}} col:6 foo 'void ()' +// CHECK-NEXT: |-OMPDeclareSimdDeclAttr {{.+}} Implicit BS_Inbranch +// CHECK: `-OMPDeclareSimdDeclAttr {{.+}} Implicit BS_Undefined #pragma omp declare target int bar() { @@ -81,11 +81,11 @@ int bar() { } #pragma omp end declare target -// CHECK: `-FunctionDecl {{.+}} line:{{.+}}:5 bar 'int ()' -// CHECK-NEXT: |-CompoundStmt {{.+}} -// CHECK-NEXT: | |-DeclStmt {{.+}} +// CHECK: `-FunctionDecl {{.+}} line:[[@LINE-6]]:5 bar 'int ()' +// CHECK-NEXT: |-CompoundStmt {{.+}} +// CHECK-NEXT: | |-DeclStmt {{.+}} // CHECK-NEXT: | | `-VarDecl {{.+}} col:7 used f 'int' -// CHECK-NEXT: | `-ReturnStmt {{.+}} +// CHECK-NEXT: | `-ReturnStmt {{.+}} // CHECK-NEXT: | `-ImplicitCastExpr {{.+}} 'int' // CHECK-NEXT: | `-DeclRefExpr {{.+}} 'int' lvalue Var {{.+}} 'f' 'int' // CHECK-NEXT: `-OMPDeclareTargetDeclAttr {{.+}} <> Implicit MT_To -- 2.40.0