[cfe-dev] Parsing C++ Header File

Raghavendra Keshav ragavendrakk at gmail.com
Wed May 29 06:40:07 PDT 2013


Thanks.
I will try this.
When i read the source code of clang...getParent would return the
Definition of Container.
Class X
{
   std::map<i,string> _map;
};

_map is one fieldDecl....i did not use it as the documentation says it
gives info of X...rather than std::map... i will try it out and let u know.

regards
ragha



On Wed, May 29, 2013 at 4:45 PM, Konstantin Tokarev <annulen at yandex.ru>wrote:

>
> 29.05.2013, 14:41, "Raghavendra Keshav" <ragavendrakk at gmail.com>:
> > Am not able get the relationship of FieldDecl to CTemplateDecl...
>
> Use getParent(), than dyn_cast it to CXXRecordDecl, than use
> getDescribedClassTemplate()
>
> > and from CTemplateDecl how to extract the params?
>
> TemplateDecl::getTemplateParameters()
>
> > Pls provide direction how to proceed further...
>
> Use Rewriter to modify source code.
>
>
> --
> Regards,
> Konstantin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130529/f9a220a5/attachment.html>


More information about the cfe-dev mailing list