[cfe-dev] How to create a SourceLocation from line number?

Sean Silva chisophugis at gmail.com
Wed Jan 7 13:22:11 PST 2015


Does SourceManager::translateFileLineCol work for you?

http://clang.llvm.org/doxygen/classclang_1_1SourceManager.html#a5573aab1578a194e43c7934e6902aeec

-- Sean Silva

On Wed, Jan 7, 2015 at 1:16 PM, Welson Sun <welson.sun at gmail.com> wrote:

> For a rewriting project, I need to replace one line text with another
> text. How do I create a SourceLocation or SourceRange for a given line
> number?
>
> Thanks,
> - Welson
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150107/026c4263/attachment.html>


More information about the cfe-dev mailing list