<div dir="ltr"><div><div><div>I found the problem! <br><br>I forgot to update my make file to link against the ARCMigrate library. </div>I realized that after adding -I$(LLVM_SRC_PATH)/tools/clang/lib/ARCMigrate to my CLANG_INCLUDES, I also had to add -lclangARCMigrate to my CLANG_LIBS, which solved the problem. <br>

</div><div>I wonder why Transforms.h isn't included in clang's tools build directory?<br></div><div><br></div>So, in conclusion, answering my first question, the following code can be used to find the location just after the semicolon:<br>

<div style="margin-left:40px"><br><i>SourceLocation SemiLoc = clang::arcmt::trans::findSemiAfterLocation(D->getLocEnd(), D->getASTContext());</i><br><br></div>Regards,<br></div>Fred<br></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 5:18 PM, Frederico Araujo <span dir="ltr"><<a href="mailto:araujof@gmail.com" target="_blank">araujof@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div><div><div><div><div>Dear list,<br><br></div>I'm implementing a small source-to-source rewriter using clang tooling and AST matchers. <br></div>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?<br>


<br></div>Looking in the documentation, I found the "<i>findLocationAfterSemi</i>" 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).<br>


<br></div><div>The function I mentioned can be found here: <br><a href="http://clang.llvm.org/doxygen/Transforms_8h.html" target="_blank">http://clang.llvm.org/doxygen/Transforms_8h.html</a><br></div><div><br></div>Any help will be much appreciated! <br>


<br></div>Thanks,<br>Fred<br></div>
</blockquote></div><br></div>