[OpenMP] Set pragma start loc to `#pragma` loc
authorJoel E. Denny <jdenny.ornl@gmail.com>
Tue, 28 May 2019 19:27:19 +0000 (19:27 +0000)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Tue, 28 May 2019 19:27:19 +0000 (19:27 +0000)
commit91f8066d1de5df00e29ac1c517d2e7353dcb3a60
tree01d179caa8c82e9c3ad9e27443f78af7cda69bcf
parent363079fe73eb6f179ecdde81e6f0d526d4ba1cf8
[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
53 files changed:
clang-tools-extra/test/clang-tidy/openmp-use-default-none.cpp
clang/lib/Parse/ParsePragma.cpp
clang/test/AST/ast-dump-openmp-atomic.c
clang/test/AST/ast-dump-openmp-barrier.c
clang/test/AST/ast-dump-openmp-cancel.c
clang/test/AST/ast-dump-openmp-cancellation-point.c
clang/test/AST/ast-dump-openmp-critical.c
clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-distribute-parallel-for.c
clang/test/AST/ast-dump-openmp-distribute-simd.c
clang/test/AST/ast-dump-openmp-distribute.c
clang/test/AST/ast-dump-openmp-flush.c
clang/test/AST/ast-dump-openmp-for-simd.c
clang/test/AST/ast-dump-openmp-for.c
clang/test/AST/ast-dump-openmp-master.c
clang/test/AST/ast-dump-openmp-ordered.c
clang/test/AST/ast-dump-openmp-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-parallel-for.c
clang/test/AST/ast-dump-openmp-parallel-sections.c
clang/test/AST/ast-dump-openmp-parallel.c
clang/test/AST/ast-dump-openmp-section.c
clang/test/AST/ast-dump-openmp-sections.c
clang/test/AST/ast-dump-openmp-simd.c
clang/test/AST/ast-dump-openmp-single.c
clang/test/AST/ast-dump-openmp-target-data.c
clang/test/AST/ast-dump-openmp-target-enter-data.c
clang/test/AST/ast-dump-openmp-target-exit-data.c
clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-target-parallel-for.c
clang/test/AST/ast-dump-openmp-target-parallel.c
clang/test/AST/ast-dump-openmp-target-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c
clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c
clang/test/AST/ast-dump-openmp-target-teams-distribute.c
clang/test/AST/ast-dump-openmp-target-teams.c
clang/test/AST/ast-dump-openmp-target-update.c
clang/test/AST/ast-dump-openmp-target.c
clang/test/AST/ast-dump-openmp-task.c
clang/test/AST/ast-dump-openmp-taskgroup.c
clang/test/AST/ast-dump-openmp-taskloop-simd.c
clang/test/AST/ast-dump-openmp-taskloop.c
clang/test/AST/ast-dump-openmp-taskwait.c
clang/test/AST/ast-dump-openmp-taskyield.c
clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
clang/test/AST/ast-dump-openmp-teams-distribute-simd.c
clang/test/AST/ast-dump-openmp-teams-distribute.c
clang/test/AST/ast-dump-openmp-teams.c
clang/test/AST/dump.cpp
clang/test/OpenMP/parallel_codegen.cpp
clang/test/OpenMP/threadprivate_codegen.cpp
clang/test/PCH/stmt-openmp_structured_block-bit.cpp