<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 28, 2014 at 11:16 AM, Daniel Quiñones Lopez <span dir="ltr"><<a href="mailto:kaos09@hotmail.com" target="_blank">kaos09@hotmail.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 dir="ltr">Hello,<br><br>I have a problem when trying to obtain the SourceRange of a BinaryOperator which RHS is a null pointer. Having something like "x = Null;", being x a pointer type variable, i can get the location of everything but the "Null", it seems like it doesn't exists. If I print the ast, the part referred to this is:<br>
<br><blockquote>`-BinaryOperator 0xc750768 <line:7:5, /usr/local/bin/../lib/clang/3.4/include/stddef.h:72:18> 'char *' lvalue '='<br>| |     |-MemberExpr 0xc750728 <prueba.cpp:7:5> 'char *' lvalue ->x 0xc7505b0<br>
| |     | `-CXXThisExpr 0xc750718 <col:5> 'class X *' this<br>| |     `-ImplicitCastExpr 0xc750758 </usr/local/bin/../lib/clang/3.4/include/stddef.h:72:18> 'char *' <NullToPointer><br>| |       `-GNUNullExpr 0xc750748 <col:18> 'int'<br>
<br></blockquote>But i don't see it clearly. Can someone help me with this?<br></div></div></blockquote><div><br></div><div>I assume your problem is that Null is a macro in your code... So you'll have to drill through the expansion / spelling locations to get to the right point.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><br>Thank you.<br>                                         </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></div>