<div dir="ltr"><div><div><div><div><div><div><div><div>Hi cfe-dev,<br><br></div>In the following C++ code :<br><br></div><div style="margin-left:40px"><span style="color:rgb(0,0,255)"><span style="font-family:monospace,monospace"><b>template <class <span style="background-color:rgb(0,255,255)">T</span>> class C {</b></span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"><b>    void bar(<span style="background-color:rgb(0,255,255)">T</span> t);</b></span><br><span style="font-family:monospace,monospace"><b>};</b></span><br><span style="font-family:monospace,monospace"></span><br><span style="font-family:monospace,monospace"></span><span style="font-family:monospace,monospace"><b>template <class T2> void C<T2>::bar(<span style="background-color:rgb(0,255,255)">T2</span> t2) { ... }</b></span></span><br></div><div style="margin-left:40px"><span style="font-family:monospace,monospace"></span></div></div></div><br></div>With the clang API, is there any way to relate template parameter T2 in bar() definition to template parameter T in class C declaration?<br></div>In other words, if I get T2 TemplateTypeParmDecl in bar() definition (function parameter) how should I do, with the clang API, to get to template parameter T of class C? How should I know T2 is just another name for T?<br><br></div>Thanks for any help !<br><br></div>Regards.<br></div>