[cfe-dev] [libclang] Template parameters of methods defined outside their class

Pouet fourtytwo via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 17 08:14:35 PST 2018


Hi cfe-dev,

In the following C++ code :

*template <class T> class C {*
*    void bar(T t);*
*};*

*template <class T2> void C<T2>::bar(T2 t2) { ... }*

With the clang API, is there any way to relate template parameter T2 in
bar() definition to template parameter T in class C declaration?
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?

Thanks for any help !

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180117/e86770f0/attachment.html>


More information about the cfe-dev mailing list