[cfe-dev] How to get line information from Statement in Control flow graph
Douglas Gregor
dgregor at apple.com
Mon Jul 26 16:31:31 PDT 2010
On Jul 26, 2010, at 4:27 PM, manavender reddy wrote:
> Hi all,
>
> I am new to clang. I was wondering if there is a way to get line information (actual line number in the source file) for each statement in the Control flow graph.
You can get the source range of any statement with Stmt::getSourceRange(). The SourceManager can help to decompose that source range into file/line/column.
- Doug
More information about the cfe-dev
mailing list