From db5a61d3cfc56b5517d587b1c3f032b4a68caa61 Mon Sep 17 00:00:00 2001 From: Roberto Raggi <roberto.raggi@nokia.com> Date: Thu, 12 Aug 2010 18:08:03 +0200 Subject: [PATCH] Process the translation unit. --- src/shared/cplusplus/Bind.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp index 793c6f72421..93904688ac8 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) -- GitLab