[libclang] Template parameters of methods defined outside their class

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[libclang] Template parameters of methods defined outside their class

Richard Smith via cfe-dev
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev