<div dir="ltr">On Wed, Aug 21, 2013 at 5:16 PM, Du Toit, Stefanus <span dir="ltr"><<a href="mailto:stefanus.du.toit@intel.com" target="_blank">stefanus.du.toit@intel.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="auto"><div><div class="h5">
<div>On 2013-08-21, at 8:10 PM, "Eli Friedman" <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>> wrote:</div>
<div><br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">On Thu, Aug 8, 2013 at 10:48 AM, Stefanus Du Toit <span dir="ltr">
<<a href="mailto:stefanus.du.toit@intel.com" target="_blank">stefanus.du.toit@intel.com</a>></span> wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: sdt<br>
Date: Thu Aug  8 12:48:14 2013<br>
New Revision: 187994<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=187994&view=rev" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=187994&view=rev</a><br>
Log:<br>
Add clang_Location_isFromMainFile() to libclang.<br>
<br>
Also bump the minor version number and update libclang.exports.<br>
<br>
Reviewed by: Dmitri Gribenko, Doug Gregor<br>
<br>
</blockquote>
<div><br>
</div>
<div>I'm currently working on a patch to split isFromMainFile into two versions; one which respects line markers (after '# 1 "XXX.h" 1', we treat the following lines as not part of the main file), and one which has the current behavior.  I think you want the
 behavior which respects line markers, but I'm not completely sure how you expect this to be used.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</div></div><div>For the use case that led me to add this, I want to know if it's physically in the main source file. I can see how the line marker behaviour would be helpful too (actually I may want that behaviour in addition myself).</div>
</div></blockquote><div><br></div><div>Okay.  I left the behavior the same for now; feel free to change it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">
<div><br>
</div>
<div>I think this should probably be exposed through a parameter in the libclang function (PhysicalOnly or RespectLineMarkers or something along those lines) and expect it should still be fine to change the API since it was added so recently (but I don't know
 if there's a specific rule about that).</div></div></blockquote><div><br></div><div>I'm not sure either.  We generally draw the line between dot releases, but if you wanted to be on the safe side, you could rename it.</div>
<div><br></div><div>-Eli</div></div></div></div>