aboutsummaryrefslogtreecommitdiffstats
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.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp
index c20e85459ee..ef259bb2545 100644
--- a/src/libs/cplusplus/LookupContext.cpp
+++ b/src/libs/cplusplus/LookupContext.cpp
@@ -752,6 +752,12 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
const TemplateNameId *templId = name->asTemplateNameId();
if (templId) {
+ // for "using" we should use the real one ClassOrNamespace(it should be the first
+ // one item from usings list)
+ // we indicate that it is a 'using' by checking number of symbols(it should be 0)
+ if (reference->symbols().count() == 0 && reference->usings().count() != 0)
+ reference = reference->_usings[0];
+
// if it is a TemplateNameId it could be a specialization(full or partial) or
// instantiation of one of the specialization(reference->_specialization) or
// base class(reference)