<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>In clang, I can get the token length to reach the end of a line by using Lexer::MeasureTokenLength while it is a token, but when it comes to a macro, I can only get the length of the macro before it expands, leading to the wrong offset of the SourceLocation. For example:</div><div> #define A 1+1</div><div>...</div><div>    return A;</div><div>When I get the SourceLocation of "return A" by using getLocEnd(), I want to reach the end of this line. But now, the Lexer::MeasureTokenLength doesn't work. It only return the length (or offset) of "A" rather than "1+1", then the SourceLocation of the end of the line will be wrong.</div><div>What should I do?</div><div>Thank you!</div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>