<div><br></div><div>Thank you for your reply. Have you ever used this API? If so, I would really appreciate a few lines of code because some of the parameters I have no idea how to get. Some, such as "<i>TemplateParameterLists</i>", are all clear but where would I get Scope from, for example?<br></div><div><br></div><div><br></div><blockquote class="protonmail_quote" type="cite"><div>-------- Original Message --------<br></div><div>Subject: Re: [cfe-dev] Clang API: specialise a class template and all its members<br></div><div>Local Time: 14 март 2016 6:14 PM<br></div><div>UTC Time: 14 март 2016 16:14<br></div><div>From: v.g.vassilev@gmail.com<br></div><div>To: dpldobrev@protonmail.com,cfe-dev@lists.llvm.org<br></div><div><br></div><div>
    <br></div><div class="moz-cite-prefix">On 12/03/16 00:53, Dimitar Dobrev via
      cfe-dev wrote:<br></div><blockquote type="cite"><div><br></div><div>Hello all,<br></div><div><br></div><div>I have a clang::ClassTemplateDecl object with a single
        template argument. I want to specialise it for a certain type
        (void*). I use the following code:<br></div><div><br></div><div>        clang::TemplateArgument
        t(C->getASTContext().VoidPtrTy);<br></div><div>        auto CTSVoidStar =
        clang::ClassTemplateSpecializationDecl::Create(C->getASTContext(),<br></div><div>            clang::TagTypeKind::TTK_Class,
        CTS->getDeclContext(), clang::SourceLocation(),
        clang::SourceLocation(),<br></div><div>            CTS->getSpecializedTemplate(), &t,
        CTS->getTemplateArgs().size(), CTS);<br></div><div><br></div><div>where CTS->getSpecializedTemplate() is my
        ClassTemplateDecl. The problem with it is while according to
        CTSVoidStar->dump() it looks correct, it lacks any functions,
        and it's the functions that I need - their mangled names in
        particular. I know for sure that my ClassTemplateDecl does have
        functions. My question is how to get a complete specialisation,
        with all members and not just the class itself. Thank you.<br></div></blockquote><div>Perhaps you could have a look at
<a href="http://clang.llvm.org/doxygen/classclang_1_1Sema.html#a959c3ea985edf81ee649c0325ad623f8" class="moz-txt-link-freetext">http://clang.llvm.org/doxygen/classclang_1_1Sema.html#a959c3ea985edf81ee649c0325ad623f8</a><br></div><div>
    Ideally calling this interface with the right set of arguments would
    create a proper specialization or a diagnostic.<br></div><div>
    --Vassil<br></div><div>
    <br></div><blockquote type="cite"><div><br></div><div><br></div><div>Regards,<br></div><div>Dimitar Dobrev<br></div><div><br></div><div><br></div><pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@lists.llvm.org" class="moz-txt-link-abbreviated">cfe-dev@lists.llvm.org</a>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" class="moz-txt-link-freetext">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br></pre></blockquote></blockquote><div><br></div>