Make sure the prefix is a class (ROOT-5856).

This commit is contained in:
Axel Naumann 2014-01-20 14:37:13 +01:00 committed by sftnight
parent 73da3a41bd
commit 0236fc8c04

View File

@ -1158,12 +1158,8 @@ namespace utils {
if (outer_ns) {
return TypeName::CreateNestedNameSpecifier(Ctx,outer_ns);
} else {
assert(llvm::isa<TagDecl>(outer) && "not in namespace of TagDecl");
return
TypeName::CreateNestedNameSpecifier(Ctx,
llvm::dyn_cast<TagDecl>(outer),
FullyQualified);
} else if (const TagDecl* TD = llvm::dyn_cast<TagDecl>(outer)) {
return TypeName::CreateNestedNameSpecifier(Ctx, TD, FullyQualified);
}
}
return 0;