[cfe-dev] Remove explicit template specializations
Vassil Vassilev
vasil.georgiev.vasilev at cern.ch
Wed Mar 2 10:03:39 PST 2011
Hi,
Yes, but in my case I know that nothing depends on the specific
specialization (I inject one artificially, analyze the output, get what
I need and I want to remove it). If I try to remove it like with
DeclContext I end up with assert. It is not possible to remove it simply
from the Scope (like I do with the when I create implicit function for
the failed sema lookups (Sema::ImplicitlyDefineFunction()))
Cheers,
Vassil
On 02.3.2011 г. 19:50, Douglas Gregor wrote:
> On Mar 2, 2011, at 9:39 AM, Vassil Vassilev wrote:
>
>> Hi all,
>> I am wondering if there is a way to remove existing explicit class
>> template specialization declaration? I cannot remove it like
>> Decl->getDeclContext()->removeDecl(Decl)..
>> I know that in ClassTemplateDecl there is addSpecialization() and no
>> removeSpecialization(). Is it complex to implement removeSpecialization()?
> It is *extremely* complex to remove a specialization, since you would have to walk the entire AST to determine if anything in the AST references the specialization.
>
> - Doug
>
More information about the cfe-dev
mailing list