<div dir="ltr">> M_E is a macro and that macro is expanded in your<br>> <br>> double varX = M_E;<br>> <br>> line. The expansion is not in math.h. The expansion is in the main file.<br>> <br>> <a href="http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/qRMj-W" rel="noreferrer" target="_blank">http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/qRMj-W</a><br><div><br></div><div>Thank you so much for the explanation</div><div><br></div><div><br></div><div>> By the way, we have a llvm channel on the cpplang slack <br>> (<a href="https://cpplang.slack.com/" rel="noreferrer" target="_blank">https://cpplang.slack.com</a>). That is a more suitable venue for your <br>> questions. This is the development mailing list.<br></div><div><br></div><div>I am sorry that I posted the questions in the wrong place. I didn't know that clang has a slack channel.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 10, 2019 at 1:01 AM Stephen Kelly via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 09/01/2019 14:15, FarSight Studios via cfe-dev wrote:<br>
> Hi,<br>
> <br>
> Combining floatLiteral() Node Matcher with isExpansionInFileMatching() <br>
> Narrowing Matcher provides unexpected results.<br>
> The following matcher: <br>
> floatLiteral(isExpansionInFileMatching("include/math.h"))<br>
> does not matches "M_E" which is defined in "math.h"<br>
> <br>
> #include <math.h><br>
> <br>
> int consts(int n){<br>
> double varX = M_E;<br>
> return varX;<br>
> }<br>
> <br>
> It matches a single unrelated node:<br>
> FloatingLiteral 0x562c409bdaa8 </usr/include/math.h:1184:47> 'float' <br>
> 0.000000e+00<br>
> <br>
> Am I doing something wrong?<br>
<br>
<br>
M_E is a macro and that macro is expanded in your<br>
<br>
double varX = M_E;<br>
<br>
line. The expansion is not in math.h. The expansion is in the main file.<br>
<br>
<a href="http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/qRMj-W" rel="noreferrer" target="_blank">http://ec2-18-191-7-3.us-east-2.compute.amazonaws.com:10240/z/qRMj-W</a><br>
<br>
By the way, we have a llvm channel on the cpplang slack <br>
(<a href="https://cpplang.slack.com" rel="noreferrer" target="_blank">https://cpplang.slack.com</a>). That is a more suitable venue for your <br>
questions. This is the development mailing list.<br>
<br>
Thanks,<br>
<br>
Stephen.<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>