diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp index 793c6f72421ceeb3d399cf8ff66b307fd5a8564a..93904688ac80f3c5c82159100e9d3c745194ed29 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)