<div dir="ltr"><div>I am writing a tool using the 3.8.0 source code.  My ASTMatcher is callExpr().bind("callExpr");  I am getting the type of the first argument with auto type = callExpr->getArg(i)->IgnoreImplicit()->getType();</div><div><br></div><div>Given this code:</div><div><br></div><div>template <typename><br>struct S{};</div><div><br></div><div>void Func2()<br>{<br> S<int> s;<br> Func(s);<br>}</div><div><br></div><div>If Func is declared as either of these, then type->getAs<TemplateSpecializationType>() returns a non-null value and type.getAsString() returns "S<int>":</div><div><br></div><div>void Func(...);</div><div><br></div><div>template <typename T><br>void Func(const T&);</div><div><br></div><div>If Func is declared as this, then type->getAs<TemplateSpecializationType>() returns null and type.getAsString() returns "struct S<int>":</div><div><br></div><div>template <typename T><br>void Func(T);</div><div><br></div><div><br></div><div><br></div><div>I would expect all three to return a non-null value and the same result from getAsString.  Why do these differ?</div></div>