Add protection. We must try to remove only the canonical specializations.

This commit is contained in:
Vassil Vassilev 2013-12-11 10:55:43 +01:00 committed by sftnight
parent 5715c2fa3c
commit 1407c9eae9

View File

@ -439,6 +439,8 @@ namespace cling {
static void removeSpecialization(FunctionTemplateDecl* self,
const FunctionDecl* specialization) {
assert(self && specialization && "Cannot be null!");
assert(specialization == specialization->getCanonicalDecl()
&& "Not the canonical specialization!?");
typedef llvm::SmallVector<FunctionDecl*, 4> Specializations;
typedef llvm::FoldingSetVector< FunctionTemplateSpecializationInfo> Set;