@@ -119,6 +119,7 @@ struct SymbolResolver::Private
119
119
const QCString &n, // in
120
120
const QCString &args, // in
121
121
bool checkCV, // in
122
+ bool insideCode, // in
122
123
const MemberDef **pTypeDef, // out
123
124
QCString *pTemplSpec, // out
124
125
QCString *pResolvedType); // out
@@ -154,6 +155,7 @@ struct SymbolResolver::Private
154
155
const Definition *d, // in
155
156
const QCString &args, // in
156
157
bool checkCV, // in
158
+ bool insideCode, // in
157
159
const QCString &explicitScopePart, // in
158
160
const std::unique_ptr<ArgumentList> &actTemplParams, // in
159
161
int &minDistance, // inout
@@ -365,6 +367,7 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
365
367
const QCString &n,
366
368
const QCString &args,
367
369
bool checkCV,
370
+ bool insideCode,
368
371
const MemberDef **pTypeDef,
369
372
QCString *pTemplSpec,
370
373
QCString *pResolvedType)
@@ -402,8 +405,21 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
402
405
auto &range = Doxygen::symbolMap->find (name);
403
406
if (range.empty ())
404
407
{
405
- // printf("%d ] not symbols\n",--level);
406
- return 0 ;
408
+ int i;
409
+ if (insideCode && (i=name.find (' <' ))!=-1 )
410
+ {
411
+ range = Doxygen::symbolMap->find (name.left (i));
412
+ if (range.empty ())
413
+ {
414
+ // printf("%d ] no symbols even without templates\n",--level);
415
+ return 0 ;
416
+ }
417
+ }
418
+ else
419
+ {
420
+ // printf("%d ] no symbols\n",--level);
421
+ return 0 ;
422
+ }
407
423
}
408
424
// printf("found symbol %zu times!\n",range.size());
409
425
@@ -492,7 +508,7 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
492
508
493
509
for (Definition *d : range)
494
510
{
495
- getResolvedSymbol (visitedKeys,scope,d,args,checkCV,explicitScopePart,actTemplParams,
511
+ getResolvedSymbol (visitedKeys,scope,d,args,checkCV,insideCode, explicitScopePart,actTemplParams,
496
512
minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
497
513
if (minDistance==0 ) break ; // we can stop reaching if we already reached distance 0
498
514
}
@@ -503,7 +519,7 @@ const Definition *SymbolResolver::Private::getResolvedSymbolRec(
503
519
{
504
520
for (Definition *d : range)
505
521
{
506
- getResolvedSymbol (visitedKeys,scope,d,QCString (),false ,explicitScopePart,actTemplParams,
522
+ getResolvedSymbol (visitedKeys,scope,d,QCString (),false ,insideCode, explicitScopePart,actTemplParams,
507
523
minDistance,bestMatch,bestTypedef,bestTemplSpec,bestResolvedType);
508
524
if (minDistance==0 ) break ; // we can stop reaching if we already reached distance 0
509
525
}
@@ -708,6 +724,7 @@ void SymbolResolver::Private::getResolvedSymbol(
708
724
const Definition *d, // in
709
725
const QCString &args, // in
710
726
bool checkCV, // in
727
+ bool insideCode, // in
711
728
const QCString &explicitScopePart, // in
712
729
const std::unique_ptr<ArgumentList> &/* actTemplParams */ , // in
713
730
int &minDistance, // inout
@@ -1564,13 +1581,14 @@ const ClassDef *SymbolResolver::resolveClass(const Definition *scope,
1564
1581
const Definition *SymbolResolver::resolveSymbol (const Definition *scope,
1565
1582
const QCString &name,
1566
1583
const QCString &args,
1567
- bool checkCV)
1584
+ bool checkCV,
1585
+ bool insideCode)
1568
1586
{
1569
1587
p->reset ();
1570
1588
if (scope==0 ) scope=Doxygen::globalScope;
1571
1589
StringUnorderedSet visitedKeys;
1572
- const Definition *result = p->getResolvedSymbolRec (visitedKeys,scope,name,args,checkCV,&p->typeDef ,&p->templateSpec ,&p->resolvedType );
1573
- // printf("resolveSymbol(%s,%s,%s,%d)=%s\n",qPrint(scope?scope->name():QCString()),qPrint(name),qPrint(args),checkCV,qPrint(result?result->qualifiedName():QCString()));
1590
+ const Definition *result = p->getResolvedSymbolRec (visitedKeys,scope,name,args,checkCV,insideCode, &p->typeDef ,&p->templateSpec ,&p->resolvedType );
1591
+ // printf("resolveSymbol(%s,%s,%s,%d,%d )=%s\n",qPrint(scope?scope->name():QCString()),qPrint(name),qPrint(args),checkCV,insideCode ,qPrint(result?result->qualifiedName():QCString()));
1574
1592
return result;
1575
1593
}
1576
1594
0 commit comments