[cfe-dev] Expr::getSourceRange() doesn't return full range
kremenek at apple.com
Wed Mar 17 15:30:16 CDT 2010
This is expected. The source range gives you the locations of the first and last token. To get the full range, you need to re-lex the last token. Check out HighlightRanges in TextDiagnosticPrinter for an example.
On Mar 17, 2010, at 11:46 AM, Stephen Deken wrote:
> There is a trailing space. Obviously, SourceRange::getEnd() is
> returning the beginning of the last token in the range.
More information about the cfe-dev