summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Bind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cplusplus/Bind.cpp')
-rw-r--r--src/shared/cplusplus/Bind.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp
index 793c6f7242..93904688ac 100644
--- a/src/shared/cplusplus/Bind.cpp
+++ b/src/shared/cplusplus/Bind.cpp
@@ -704,9 +704,12 @@ void Bind::translationUnit(TranslationUnitAST *ast)
if (! ast)
return;
+ Namespace *globalNamespace = control()->newNamespace(0, 0);
+ Scope *previousScope = switchScope(globalNamespace);
for (DeclarationListAST *it = ast->declaration_list; it; it = it->next) {
this->declaration(it->value);
}
+ (void) switchScope(previousScope);
}
bool Bind::visit(ObjCProtocolRefsAST *ast)