[cfe-dev] Help with clang AST matchers: find semicolon after a decl statement

Frederico Araujo araujof at gmail.com
Wed Jul 30 15:18:58 PDT 2014


Dear list,

I'm implementing a small source-to-source rewriter using clang tooling and
AST matchers.
I'd like to ask if there is a way to use clang's API to find the source
location after a semicolon of a matched declaration statement?

Looking in the documentation, I found the "*findLocationAfterSemi*"
function which seems to be exactly what I want. However, I'm not being able
to use it. Searching my llvm sources, I see its corresponding header file
Transforms.h in <llvm_src_dir>/tools/clang/lib/ARCMigrate/ but not inside
any sub-directory inside the directory I compiled clang (using cmake).

The function I mentioned can be found here:
http://clang.llvm.org/doxygen/Transforms_8h.html

Any help will be much appreciated!

Thanks,
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140730/9b3b1c0f/attachment.html>


More information about the cfe-dev mailing list