@@ -43,6 +43,15 @@ static std::unordered_map<std::string, std::pair<QCString,const MemberDef *> > g
4343
4444// --------------------------------------------------------------------------------------
4545
46+ static bool isCodeSymbol (Definition::DefType defType)
47+ {
48+ return defType==Definition::TypeClass || defType==Definition::TypeNamespace ||
49+ defType==Definition::TypeModule || defType==Definition::TypeMember ||
50+ defType==Definition::TypePackage || defType==Definition::TypeConcept;
51+ }
52+
53+ // --------------------------------------------------------------------------------------
54+
4655/* * Helper class representing the stack of items considered while resolving
4756 * the scope.
4857 */
@@ -339,8 +348,11 @@ const ClassDef *SymbolResolver::Private::getResolvedTypeRec(
339348
340349 for (Definition *d : range)
341350 {
342- getResolvedType (visitedKeys,scope,d,explicitScopePart,actTemplParams.get (),
343- minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
351+ if (isCodeSymbol (d->definitionType ()))
352+ {
353+ getResolvedType (visitedKeys,scope,d,explicitScopePart,actTemplParams.get (),
354+ minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
355+ }
344356 if (minDistance==0 ) break ; // we can stop reaching if we already reached distance 0
345357 }
346358
@@ -507,8 +519,11 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
507519
508520 for (Definition *d : range)
509521 {
510- getResolvedSymbol (visitedKeys,scope,d,args,checkCV,insideCode,explicitScopePart,false ,
511- minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
522+ if (isCodeSymbol (d->definitionType ()))
523+ {
524+ getResolvedSymbol (visitedKeys,scope,d,args,checkCV,insideCode,explicitScopePart,false ,
525+ minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
526+ }
512527 if (minDistance==0 ) break ; // we can stop reaching if we already reached distance 0
513528 }
514529
@@ -518,8 +533,11 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
518533 {
519534 for (Definition *d : range)
520535 {
521- getResolvedSymbol (visitedKeys,scope,d,QCString (),false ,insideCode,explicitScopePart,true ,
536+ if (isCodeSymbol (d->definitionType ()))
537+ {
538+ getResolvedSymbol (visitedKeys,scope,d,QCString (),false ,insideCode,explicitScopePart,true ,
522539 minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
540+ }
523541 if (minDistance==0 ) break ; // we can stop reaching if we already reached distance 0
524542 }
525543 }
@@ -1325,8 +1343,9 @@ int SymbolResolver::Private::isAccessibleFrom(VisitedKeys &visitedKeys,
13251343 const Definition *scope,
13261344 const Definition *item)
13271345{
1328- AUTO_TRACE (" scope={} item={}" ,
1329- scope?scope->name ():QCString (), item?item->name ():QCString ());
1346+ AUTO_TRACE (" scope={} item={} item.definitionType={}" ,
1347+ scope?scope->name ():QCString (), item?item->name ():QCString (),
1348+ item?(int )item->definitionType ():-1 );
13301349
13311350 if (accessStack.find (scope,m_fileScope,item))
13321351 {
@@ -1390,8 +1409,8 @@ int SymbolResolver::Private::isAccessibleFrom(VisitedKeys &visitedKeys,
13901409 if (nestedClassInsideBaseClass)
13911410 {
13921411 result++; // penalty for base class to prevent
1393- // this is preferred over nested class in this class
1394- // see bug 686956
1412+ // this is preferred over nested class in this class
1413+ // see bug 686956
13951414 }
13961415 else if (memberAccessibleFromScope &&
13971416 itemScope &&
0 commit comments