summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/LookupContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/cplusplus/LookupContext.cpp')
-rw-r--r--src/libs/cplusplus/LookupContext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index 4908b1c65e..b6a9d62a6d 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -518,6 +518,14 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
item.setDeclaration(s);
item.setBinding(binding);
+ if (s->asNamespaceAlias() && binding) {
+ ClassOrNamespace *targetNamespaceBinding = binding->lookupType(name);
+ if (targetNamespaceBinding && targetNamespaceBinding->symbols().size() == 1) {
+ Symbol *resolvedSymbol = targetNamespaceBinding->symbols().first();
+ item.setType(resolvedSymbol->type()); // override the type
+ }
+ }
+
if (templateId && (s->isDeclaration() || s->isFunction())) {
FullySpecifiedType ty = DeprecatedGenTemplateInstance::instantiate(templateId, s, _control);
item.setType(ty); // override the type.