summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-04-09 01:49:26 +0000
committerDouglas Gregor <dgregor@apple.com>2013-04-09 01:49:26 +0000
commit8ccbc18efa244023edd07661f4b23c9d42a20819 (patch)
tree8b923e58908bf8a388a9dce51b7dcc94d52a31f7 /clang/lib
parent25049096cb8e72914b4da4f236fc52416d7398ca (diff)
downloadbcm5719-llvm-8ccbc18efa244023edd07661f4b23c9d42a20819.tar.gz
bcm5719-llvm-8ccbc18efa244023edd07661f4b23c9d42a20819.zip
Skip transparent contexts when looking for using directives in name lookup.
Fixes the bootstrap regression I introduced in r179067. llvm-svn: 179079
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index ebe28944062..b631d8b930a 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -962,8 +962,12 @@ bool Sema::CppLookupName(LookupResult &R, Scope *S) {
// If we haven't handled using directives yet, do so now.
if (!VisitedUsingDirectives) {
// Add using directives from this context up to the top level.
- for (DeclContext *UCtx = Ctx; UCtx; UCtx = UCtx->getParent())
+ for (DeclContext *UCtx = Ctx; UCtx; UCtx = UCtx->getParent()) {
+ if (UCtx->isTransparentContext())
+ continue;
+
UDirs.visit(UCtx, UCtx);
+ }
// Find the innermost file scope, so we can add using directives
// from local scopes.
OpenPOWER on IntegriCloud