<div dir="ltr">I can't reproduce the issue (how I understand it) using clang-query, and <a href="http://reviews.llvm.org/D18136">http://reviews.llvm.org/D18136</a> doesn't apply cleanly, since it depends on some other patch.<div><br></div><div><div>$ cat /tmp/q.cc </div><div>namespace boost {</div><div>template <typename T, typename C></div><div>T lexical_cast(const C&) {</div><div> return T();</div><div>}</div><div>}</div><div><br></div><div>namespace std {</div><div>template <typename T></div><div>class basic_string {};</div><div>using string = basic_string<char>;</div><div>}</div><div><br></div><div>int g();</div><div>long long f(int p);</div><div>using namespace boost;</div><div><br></div><div>template <typename T></div><div>void string_as_T() {</div><div> boost::lexical_cast<T>(42);</div><div>}</div><div><br></div><div>int main() { string_as_T<std::string>(); }</div></div><div><br></div><div><div>$ clang-query /tmp/q.cc -- -std=c++11</div><div>clang-query> m callExpr()</div><div><br></div><div>Match #1:</div><div><br></div><div>/tmp/q.cc:20:3: note: "root" binds here</div><div> boost::lexical_cast<T>(42);</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~~</div><div><br></div><div>Match #2:</div><div><br></div><div>/tmp/q.cc:20:3: note: "root" binds here</div><div> boost::lexical_cast<T>(42);</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~~</div><div><br></div><div>Match #3:</div><div><br></div><div>/tmp/q.cc:23:14: note: "root" binds here</div><div>int main() { string_as_T<std::string>(); }</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>3 matches.</div><div>clang-query> m callExpr(unless(isInTemplateInstantiation()))</div><div><br></div><div>Match #1:</div><div><br></div><div>/tmp/q.cc:20:3: note: "root" binds here</div><div> boost::lexical_cast<T>(42);</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~~</div><div><br></div><div>Match #2:</div><div><br></div><div>/tmp/q.cc:23:14: note: "root" binds here</div><div>int main() { string_as_T<std::string>(); }</div><div> ^~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>2 matches.</div><div>clang-query> </div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 7, 2016 at 8:25 PM, Piotr Padlewski <span dir="ltr"><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This should be enough to break this matcher<div><a href="http://pastebin.com/CH7a3hur" target="_blank">http://pastebin.com/CH7a3hur</a><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-04-07 18:56 GMT+02:00 Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you provide a minimal test for this?</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 7, 2016 at 4:04 PM, Piotr Padlewski <span dir="ltr"><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">bump.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-04 20:48 GMT+02:00 Piotr Padlewski <span dir="ltr"><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Hi guys,</div><div>I am having trobles with isInTemplateInstantiation matcher. When I run my matcher (<a href="http://reviews.llvm.org/D18136" target="_blank">http://reviews.llvm.org/D18136</a>), it fails on the assert in ASTTypeTraits.h:299, when KindId is NodeKindId::NKI_TemplateArgument.</div><div><br></div><div>I think my matcher is fine, and there is bug somewhere. Can someone please tell me if I am doing something wrong, and if not, why it doesn't work and what I should fix?</div><div><br></div><div>Here is my backtrace <a href="http://4programmers.net/Pastebin/5347" target="_blank">http://4programmers.net/Pastebin/5347</a></div><div><br></div><div>Best</div><span><font color="#888888"><div>Piotr</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>