<div dir="ltr"><div>A related question: how do you get the line number from a SourceLocation. There is something in FullSourceLocation, but you can only get the SourceLocation from a Stmt.<br><br></div>-Welson<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 5:35 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Jan 8, 2015 at 1:14 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Thu, Jan 8, 2015 at 12:44 AM, Csaba Raduly <span dir="ltr"><<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Jan 7, 2015 at 10:22 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>> wrote:<br>
> Does SourceManager::translateFileLineCol work for you?<br>
><br>
> <a href="http://clang.llvm.org/doxygen/classclang_1_1SourceManager.html#a5573aab1578a194e43c7934e6902aeec" target="_blank">http://clang.llvm.org/doxygen/classclang_1_1SourceManager.html#a5573aab1578a194e43c7934e6902aeec</a><br>
<br>
</span>Which says:<br>
"<br>
If the source file is included multiple times, the source location<br>
will be based upon the first inclusion.<br>
If the source file is included multiple times, the source location<br>
will be based upon an arbitrary inclusion.<br>
"<br>
<br>
These two sentences contradict each other.<br>
<span><font color="#888888"><br></font></span></blockquote><div><br></div></span><div>Indeed. Which one is it?</div></div></div></div></blockquote><div><br></div></span><div>... and that's why you don't duplicate function comments between header and source file. =)</div></div></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">- Welson<br><div><div><div><br></div></div></div></div></div>
</div>