<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 14/03/16 17:22, Dimitar Dobrev
      wrote:<br>
    </div>
    <blockquote
cite="mid:StixB0A-25vqSDES1NBo8lqnn8331AxVXpKTC65dLlFaRzBa_4xZD37KhhcA3zfJYGq9Be4aOfq99hMpKwOEaA==@protonmail.com"
      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>
    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>
    --Vassil<br>
    <blockquote
cite="mid:StixB0A-25vqSDES1NBo8lqnn8331AxVXpKTC65dLlFaRzBa_4xZD37KhhcA3zfJYGq9Be4aOfq99hMpKwOEaA==@protonmail.com"
      type="cite">
      <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: <a class="moz-txt-link-abbreviated" href="mailto:v.g.vassilev@gmail.com">v.g.vassilev@gmail.com</a><br>
        </div>
        <div>To: <a class="moz-txt-link-abbreviated" href="mailto:dpldobrev@protonmail.com,cfe-dev@lists.llvm.org">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 moz-do-not-send="true"
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 moz-do-not-send="true" href="mailto:cfe-dev@lists.llvm.org" class="moz-txt-link-abbreviated">cfe-dev@lists.llvm.org</a>
<a moz-do-not-send="true" 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>
</pre>
        </blockquote>
      </blockquote>
      <div><br>
      </div>
    </blockquote>
    <br>
  </body>
</html>