Decl *LocalInstantiationScope::getInstantiationOf(const Decl *D) {
llvm::PointerUnion<Decl *, DeclArgumentPack *> *Found= findInstantiationOf(D);
- if (!Found)
- return 0;
+ assert(Found);
if (Found->is<Decl *>())
return Found->get<Decl *>();
break;
}
- assert(D->isInvalidDecl() &&
- "declaration was not instantiated in this scope!");
+ assert(0 && "declaration was not instantiated in this scope!");
return 0;
}
llvm::PointerUnion<Decl *, DeclArgumentPack *> *Instantiation
= CurrentInstantiationScope->findInstantiationOf(
Unexpanded[I].first.get<NamedDecl *>());
- if (Instantiation &&
- Instantiation->is<DeclArgumentPack *>()) {
+ if (Instantiation->is<DeclArgumentPack *>()) {
// We could expand this function parameter pack.
NewPackSize = Instantiation->get<DeclArgumentPack *>()->size();
} else {
llvm::PointerUnion<Decl *, DeclArgumentPack *> *Instantiation
= CurrentInstantiationScope->findInstantiationOf(
Unexpanded[I].first.get<NamedDecl *>());
- if (Instantiation && Instantiation->is<DeclArgumentPack *>())
+ if (Instantiation->is<DeclArgumentPack *>())
return Instantiation->get<DeclArgumentPack *>()->size();
continue;