[cfe-dev] source-code representation of an Expr

Sam sam at cs.jhu.edu
Wed Dec 29 12:53:53 PST 2010


Yes, I just don't know what to *do* with it ;-) In other words, I don't see
a clear use of the SourceManager API once I have the SourceRange to extract
the Expr's source-code.  I don't see any API calls that use SourceRange or
beginning and ending SourceLocations for source-code extraction.

On Wed, Dec 29, 2010 at 3:48 PM, John McCall <rjmccall at apple.com> wrote:

> On Dec 29, 2010, at 10:21 AM, Sam wrote:
> > Is there a relatively painless way to get the exact source-code
> representation of an Expr?  I've looked into using
> SourceManager::getCharacterData(E->getExprLoc()), but it's not really what I
> want.  I am fairly new to the clang API so I realize that I may have missed
> something obvious.
>
> Well, starting with the expression's SourceRange instead of a single
> SourceLocation would be a good start.
>
> John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101229/ba4f710b/attachment.html>


More information about the cfe-dev mailing list