[cfe-dev] Confused by getPointOfInstantiation() of ClassTemplateSpecializationDecl

Limin Fu phoolimin at gmail.com
Thu Jul 7 14:51:52 PDT 2011


Hello,

I am trying to handle C++ templates in my automatic binding tool based on
Clang. I run into a problem that requires to determine the location of the
first instantiation of a template class.

Basically, I have a file that declares a function with parameter of type
"std::vector<MyClass>". From the FunctionDecl of that function, I get
a TemplateSpecializationType object and then
a ClassTemplateSpecializationDecl object for the parameter type. I thought
method getPointOfInstantiation() of ClassTemplateSpecializationDecl will
give a location in my file, but instead, it gives a location from
stl_vector.h.

Isn't the instantiation point supposed to be located in my file? Or am I
understanding something wrong here? Thanks a lot.

Limin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110707/8a51b8c8/attachment.html>


More information about the cfe-dev mailing list