hanchenye-llvm-project/clang/examples
Joel E. Denny ddde0ec1e4 [PragmaHandler] Expose `#pragma` location
Currently, a pragma AST node's recorded location starts at the
namespace token (such as `omp` in the case of OpenMP) after the
`#pragma` token, and the `#pragma` location isn't available.  However,
the `#pragma` location can be useful when, for example, rewriting a
directive using Clang's Rewrite facility.

This patch makes `#pragma` locations available in any `PragmaHandler`
but it doesn't yet make use of them.

This patch also uses the new `struct PragmaIntroducer` to simplify
`Preprocessor::HandlePragmaDirective`.  It doesn't do the same for
`PPCallbacks::PragmaDirective` because that changes the API documented
in `clang-tools-extra/docs/pp-trace.rst`, and I'm not sure about
backward compatibility guarantees there.

Reviewed By: ABataev, lebedev.ri, aaron.ballman

Differential Revision: https://reviews.llvm.org/D61643

llvm-svn: 361335
2019-05-21 23:51:38 +00:00
..
AnnotateFunctions [PragmaHandler] Expose `#pragma` location 2019-05-21 23:51:38 +00:00
PrintFunctionNames Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
clang-interpreter [build] Rename clang-headers to clang-resource-headers 2019-03-04 21:19:53 +00:00
CMakeLists.txt Reland "[analyzer] Add an example plugin for checker dependency handling" 2019-05-16 13:22:04 +00:00