[cfe-dev] Visiting out of line template method definitions
Konstantin Tokarev
annulen at yandex.ru
Tue Oct 23 11:00:07 PDT 2012
23.10.2012, 20:58, "Konstantin Tokarev" <annulen at yandex.ru>:
> 19.10.2012, 22:49, "John McCall" <rjmccall at apple.com>:
>
>> On Oct 19, 2012, at 4:31 AM, Konstantin Tokarev wrote:
>>> 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.
>
> 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.
--
Regards,
Konstantin
More information about the cfe-dev
mailing list