forked from OSchip/llvm-project
Put the usage-directive inside the nearest namespace or TU decl. We don't want
to have UsingDirectiveDecl inside anything other than those two. No user-visible functionality change. llvm-svn: 167376
This commit is contained in:
parent
2c96d30dd8
commit
3811582038
clang/lib/Sema
|
@ -5595,15 +5595,15 @@ Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
|
|||
|
||||
if (!PrevNS) {
|
||||
UsingDirectiveDecl* UD
|
||||
= UsingDirectiveDecl::Create(Context, CurContext,
|
||||
= UsingDirectiveDecl::Create(Context, Parent,
|
||||
/* 'using' */ LBrace,
|
||||
/* 'namespace' */ SourceLocation(),
|
||||
/* qualifier */ NestedNameSpecifierLoc(),
|
||||
/* identifier */ SourceLocation(),
|
||||
Namespc,
|
||||
/* Ancestor */ CurContext);
|
||||
/* Ancestor */ Parent);
|
||||
UD->setImplicit();
|
||||
CurContext->addDecl(UD);
|
||||
Parent->addDecl(UD);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue