summaryrefslogtreecommitdiffstats
path: root/clang/test/AST/dump.cpp
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2019-05-28 19:27:19 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2019-05-28 19:27:19 +0000
commit91f8066d1de5df00e29ac1c517d2e7353dcb3a60 (patch)
tree01d179caa8c82e9c3ad9e27443f78af7cda69bcf /clang/test/AST/dump.cpp
parent363079fe73eb6f179ecdde81e6f0d526d4ba1cf8 (diff)
downloadbcm5719-llvm-91f8066d1de5df00e29ac1c517d2e7353dcb3a60.tar.gz
bcm5719-llvm-91f8066d1de5df00e29ac1c517d2e7353dcb3a60.zip
[OpenMP] Set pragma start loc to `#pragma` loc
This patch adjusts `PragmaOpenMPHandler` to set the location of `tok::annot_pragma_openmp` to the `#pragma` location instead of the `omp` location so that the former becomes the start location of the OpenMP AST node. This can be useful when, for example, rewriting a directive using Clang's Rewrite facility. Most of this patch updates tests for changes to locations in diagnostics and `-ast-dump` output. Reviewed By: ABataev, lebedev.ri, Meinersbur, aaron.ballman Differential Revision: https://reviews.llvm.org/D61509 llvm-svn: 361867
Diffstat (limited to 'clang/test/AST/dump.cpp')
-rw-r--r--clang/test/AST/dump.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/AST/dump.cpp b/clang/test/AST/dump.cpp
index e257cfa99ed..641abc5ea64 100644
--- a/clang/test/AST/dump.cpp
+++ b/clang/test/AST/dump.cpp
@@ -5,7 +5,7 @@
int ga, gb;
#pragma omp threadprivate(ga, gb)
-// CHECK: |-OMPThreadPrivateDecl {{.+}} <col:9> col:9
+// CHECK: |-OMPThreadPrivateDecl {{.+}} <col:1> col:1
// CHECK-NEXT: | |-DeclRefExpr {{.+}} <col:27> 'int' lvalue Var {{.+}} 'ga' 'int'
// CHECK-NEXT: | `-DeclRefExpr {{.+}} <col:31> 'int' lvalue Var {{.+}} 'gb' 'int'
@@ -50,7 +50,7 @@ struct S {
}
};
-// CHECK: | `-OMPParallelForDirective {{.+}} {{<line:.+:9, col:80>|<col:9, col:80>}}
+// CHECK: | `-OMPParallelForDirective {{.+}} {{<line:.+:1, col:80>|<col:1, col:80>}}
// CHECK-NEXT: | |-OMPDefaultClause {{.+}} <col:26, col:38>
// CHECK-NEXT: | |-OMPPrivateClause {{.+}} <col:40, col:49>
// CHECK-NEXT: | | `-DeclRefExpr {{.+}} <col:48> 'int' lvalue OMPCapturedExpr {{.+}} 'a' 'int &'
@@ -71,8 +71,8 @@ struct S {
void foo();
// CHECK: |-FunctionDecl {{.+}} <line:[[@LINE-2]]:1, col:10> col:6 foo 'void ()'
-// CHECK-NEXT: |-OMPDeclareSimdDeclAttr {{.+}} <line:[[@LINE-4]]:9, col:34> Implicit BS_Inbranch
-// CHECK: `-OMPDeclareSimdDeclAttr {{.+}} <line:[[@LINE-6]]:9, col:25> Implicit BS_Undefined
+// CHECK-NEXT: |-OMPDeclareSimdDeclAttr {{.+}} <line:[[@LINE-4]]:1, col:34> Implicit BS_Inbranch
+// CHECK: `-OMPDeclareSimdDeclAttr {{.+}} <line:[[@LINE-6]]:1, col:25> Implicit BS_Undefined
#pragma omp declare target
int bar() {
OpenPOWER on IntegriCloud