Got it. Thanks very much. <br><br><div class="gmail_quote">On Wed, Jul 10, 2013 at 4:53 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 class="HOEnZb"><div class="h5">On Wed, Jul 10, 2013 at 4:32 PM, G Raghuram <<a href="mailto:contactraghu@gmail.com">contactraghu@gmail.com</a>> wrote:<br>


><br>
><br>
> Hi,<br>
><br>
>  I am playing around a bit of with clang and have hit a problem. For a Clang<br>
> input with if statement, I am trying to obtain line number of beginning of<br>
> Then statement and then print it out. But I am not able to make sense of the<br>
> output. Can you please help.  In a nutshell I am trying to get presumed loc<br>
> from sourceloc of Then statement. For the following input, its printing 6<br>
> and 12 instead of 4 and 8.<br>
><br>
><br>
> Detailed description can be found at<br>
><br>
> <a href="http://stackoverflow.com/questions/17582628/not-able-to-print-correct-line-numbers-for-then-part-of-if-statement-clang" target="_blank">http://stackoverflow.com/questions/17582628/not-able-to-print-correct-line-numbers-for-then-part-of-if-statement-clang</a><br>


><br>
> My code (250 lines, but important stuff is between lines 100 and 105) is at<br>
> <a href="http://pastebin.com/txF9Bwa4" target="_blank">http://pastebin.com/txF9Bwa4</a><br>
><br>
><br>
> My input is <a href="http://pastebin.com/hF5yMMAz" target="_blank">http://pastebin.com/hF5yMMAz</a><br>
><br>
> 1 #include <stdio.h><br>
><br>
><br>
> 2 int func (int abc, int xyz) {<br>
><br>
> 3     if (abc-1)<br>
> 4     {<br>
> 5         printf ("1\n");<br>
> 6     }<br>
><br>
><br>
> 7      if (abc-2)<br>
> 8     {<br>
> 9         printf ("2\n");<br>
><br>
> 10 }<br>
><br>
> 11<br>
><br>
> 12 return 0;<br>
><br>
> 13 }<br>
><br>
><br>
><br>
> Please let me know if you need any additional information. Compilation<br>
> instructions are in the stackoverflow link.<br>
<br>
</div></div>I've posted an answer on stackoverflow.<br>
</blockquote></div><br>