<div dir="ltr">I have a ParsingDeclarator object during parsing, and I want to find out if it is a function template before a Decl* is generated for the declarator. As a first step, I used D.isDeclarationOfFunction() to make sure that the declarator is a function. Then I make sure that TemplateInfo.TemplateParams is not null. But these two checks does not catch the following case :<div>
<br></div><div>template<typename T></div><div>struct foo {</div><div>  void bar(int);</div><div>};</div><div><br></div><div>The above two conditions are true for the 'bar' declarator. Even though bar appears within a class template, bar itself is not a function template. How do I detect this case? I suspect that the getDepth() function in TemplateParameterList should be useful, but I am not able to figure out the exact check I need to do. Any hints will be helpful.</div>
<div><br></div><div>Thanks,</div><div>Manjunath</div></div>