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

John McCall rjmccall at apple.com
Wed Dec 29 12:48:53 PST 2010


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.



More information about the cfe-dev mailing list