summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-11-04 20:21:54 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-11-04 20:21:54 +0000
commit381158203810b94770fb5c76848ffde0c3fdb148 (patch)
tree82079df7971e03786993efd1bc8444af02cbb5c8 /clang/lib/Sema
parent2c96d30dd88b49d26d18415ddf6ae6e74d33884c (diff)
downloadbcm5719-llvm-381158203810b94770fb5c76848ffde0c3fdb148.tar.gz
bcm5719-llvm-381158203810b94770fb5c76848ffde0c3fdb148.zip
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
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index f0bd8105743..f9eb9ebc992 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -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);
}
}
OpenPOWER on IntegriCloud