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:
Nick Lewycky 2012-11-04 20:21:54 +00:00
parent 2c96d30dd8
commit 3811582038
1 changed files with 3 additions and 3 deletions
clang/lib/Sema

View File

@ -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);
}
}