Properly handle (ignore) outer scope that are not namespace or TagDecl
git-svn-id: http://root.cern.ch/svn/root/trunk@47513 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
a68395dc86
commit
65e877ce0f
@ -410,9 +410,12 @@ namespace utils {
|
||||
prefix = CreateNestedNameSpecifier(Ctx,
|
||||
llvm::dyn_cast<NamespaceDecl>(outer));
|
||||
} else {
|
||||
assert(llvm::isa<TagDecl>(outer)&& "not in namespace of TagDecl");
|
||||
prefix = CreateNestedNameSpecifier(Ctx,
|
||||
llvm::dyn_cast<TagDecl>(outer));
|
||||
// We should only create the nested name specifier
|
||||
// if the outer scope is really a TagDecl.
|
||||
// It could also be a CXXMethod for example.
|
||||
TagDecl *tdecl = llvm::dyn_cast<TagDecl>(outer);
|
||||
if (tdecl)
|
||||
prefix = CreateNestedNameSpecifier(Ctx,tdecl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user