Fix semantic of C++ 11 inline namespaces.

Add the declaring `inline' namespace to the `using list' of its
enclosing namespace symbol. This should be enough to ensure
the correct visibility of the symbols declarated in the inlined
namespace.

Change-Id: Id4de74577c498fe439a49709a306ef0deb145988
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Roberto Raggi
2012-02-03 13:50:04 +01:00
parent d955d873b4
commit 5fb624b1db
6 changed files with 182 additions and 2 deletions

View File

@@ -817,7 +817,11 @@ bool CreateBindings::visit(Namespace *ns)
for (unsigned i = 0; i < ns->memberCount(); ++i)
process(ns->memberAt(i));
if (ns->isInline() && previous)
previous->addUsing(_currentClassOrNamespace);
_currentClassOrNamespace = previous;
return false;
}