Fixes the bootstrap regression I introduced in r179067.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179079
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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.
namespace M2 {
using namespace Other;
- namespace MInner {
- class Bar {
- void bar();
- };
+ extern "C" {
+ namespace MInner {
+ extern "C" {
+ class Bar {
+ void bar();
+ };
+ }
+ }
}
}