<div dir="ltr">If I understand correctly you think that FunctionDecl at line 8 should point to line 11? That doesn't seem right, what you have at line 8 really is a function declaration. What you have at line 11 is the definition of previously declared function.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 4, 2015 at 12:49 AM, Dimitar Dobrev <span dir="ltr"><<a href="mailto:dpldobrev@yahoo.com" target="_blank">dpldobrev@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:12px"><div><br></div><div>    Hi all,</div><div><br></div><div dir="ltr">    I have the following header:<br><br><br>    class Class1<br>    {<br>    };<br><br>    class Class2<br>    {<br>    public:<br>        friend inline const Class1 operator+(const Class1& f1, const Class1& f2);<br>    };<br><br>    inline const Class1 operator+(const Class1& f1, const Class1& f2)<br>    {<br>        return Class1();<br>    }<br><br><br>    Decl::getLocation() returns line 8 for the friend - that's correct. But it returns 8 for the friend declaration, that is, the function itself, too, while the function is actually located at line 11. If the friend is deleted, then the correct location is reported.</div><div dir="ltr"><br></div><div dir="ltr">    I think it's a bug so I filed it at <a href="https://llvm.org/bugs/show_bug.cgi?id=23401" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=23401</a> . But I may me wrong so I'd appreciate your opinion.</div><span class="HOEnZb"><font color="#888888"><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">    Dimitar Dobrev</div><div dir="ltr"><br></div><div> </div></font></span></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></div>