<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 12/03/16 00:53, Dimitar Dobrev via
cfe-dev wrote:<br>
</div>
<blockquote
cite="mid:2k_TY3uJKQGPPX1khYLqp9xhY-pTn2JSeWuHsN025qFUQLk1i05nTV63dkTAZRbp3w3I3lIHt7aAvJ94kfnSBg==@protonmail.com"
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>
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>
Ideally calling this interface with the right set of arguments would
create a proper specialization or a diagnostic.<br>
--Vassil<br>
<blockquote
cite="mid:2k_TY3uJKQGPPX1khYLqp9xhY-pTn2JSeWuHsN025qFUQLk1i05nTV63dkTAZRbp3w3I3lIHt7aAvJ94kfnSBg==@protonmail.com"
type="cite">
<div><br>
</div>
<div><br>
</div>
<div>Regards,<br>
</div>
<div>Dimitar Dobrev<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
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>
</pre>
</blockquote>
<br>
</body>
</html>