summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/LookupContext.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2012-02-03 13:50:04 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2012-02-03 15:37:17 +0100
commit5fb624b1dbbf15185774d4f4b07b5cfeceab154f (patch)
tree1c6b00ef0d2109f6614d8e3a37c2ffc90986939f /src/libs/cplusplus/LookupContext.cpp
parentd955d873b4b3f7ed18f2927a292b8150dfe00cce (diff)
downloadqt-creator-5fb624b1dbbf15185774d4f4b07b5cfeceab154f.tar.gz
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>
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r--src/libs/cplusplus/LookupContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 2fdcc6a913..b9ffa9d10b 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -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;
}