<div><br></div><div>I understand. Thank you very much for your time.<br></div><div><br></div><div>Dimitar<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:31 PM<br></div><div>UTC Time: 14 март 2016 16:31<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 14/03/16 17:22, Dimitar Dobrev
      wrote:<br></div><blockquote type="cite"><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></blockquote><div>That's the tricky part. One way to do this: construct a valid C++
    example; compile it with a debug version of clang; attach gdb to it;
    set a breakpoint and investigate how those parameters get created.<br></div><div>
    --Vassil<br></div><div>
    <br></div><blockquote type="cite"><div><br></div><div><br></div><blockquote type="cite" class="protonmail_quote"><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: <a href="mailto:v.g.vassilev@gmail.com" class="moz-txt-link-abbreviated">v.g.vassilev@gmail.com</a><br></div><div>To: <a href="mailto:dpldobrev@protonmail.com,cfe-dev@lists.llvm.org" class="moz-txt-link-abbreviated">dpldobrev@protonmail.com,cfe-dev@lists.llvm.org</a><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 class="moz-txt-link-freetext" href="http://clang.llvm.org/doxygen/classclang_1_1Sema.html#a959c3ea985edf81ee649c0325ad623f8">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 class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br></pre></blockquote></blockquote><div><br></div></blockquote></blockquote><div><br></div>