forked from OSchip/llvm-project
Do not add using directives to a function decl context when instantiating.
llvm-svn: 163208
This commit is contained in:
parent
4d45b9b784
commit
8843f9f3d4
|
@ -1813,7 +1813,12 @@ Decl *TemplateDeclInstantiator::VisitUsingDirectiveDecl(UsingDirectiveDecl *D) {
|
|||
D->getIdentLocation(),
|
||||
D->getNominatedNamespace(),
|
||||
D->getCommonAncestor());
|
||||
Owner->addDecl(Inst);
|
||||
|
||||
// Add the using directive to its declaration context
|
||||
// only if this is not a function or method.
|
||||
if (!Owner->isFunctionOrMethod())
|
||||
Owner->addDecl(Inst);
|
||||
|
||||
return Inst;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue