Hi all,
I'd like to visit out of line declarations of template methods to set up one-one relationships between TemplateTypeParmDecl's in method definition and in "base" ClassTemplateDecl.
Is it possible to do this? I haven't found a way to find method declarations for ClassTemplateDecl, and also haven't found a way to determine if CXXRecordDecl is out of line template method definition of certain ClassTemplateDecl.
I'd like to visit out of line declarations of template methods to set up one-one relationships between TemplateTypeParmDecl's in method definition and in "base" ClassTemplateDecl.
Is it possible to do this? I haven't found a way to find method declarations for ClassTemplateDecl,
All the content of the class is kept on the "pattern" declaration, getTemplatedDecl(), which otherwise looks like a normal CXXRecordDecl.
and also haven't found a way to determine if CXXRecordDecl is out of line template method definition of certain ClassTemplateDecl.
You mean if a CXXMethodDecl is an out-of-line method declaration? isOutOfLine() should work; alternatively, if you found the declaration by walking the translation unit, it's obvious out of line.
John.
OK, thanks. Now I see that out of line template method is just plain CXXMethodDecl.
However, I don't understand how do I get template parameter declarations for CXXMethodDecl which is out of line template method.
DeclaratorDecl::getTemplateParameterList(), sorry for the noise.