Skip to content

Commit 234ebc2

Browse files
committed
issue #10404 Wrong type for overloaded template method in tagfile
1 parent 38ef377 commit 234ebc2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/doxygen.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2579,6 +2579,14 @@ static int findFunctionPtr(const std::string &type,SrcLangExt lang, int *pLength
25792579
i = match.position();
25802580
l = match.length();
25812581
}
2582+
if (i!=std::string::npos)
2583+
{
2584+
size_t di = type.find("decltype(");
2585+
if (di!=std::string::npos && di<i)
2586+
{
2587+
i = std::string::npos;
2588+
}
2589+
}
25822590
size_t bb=type.find('<');
25832591
size_t be=type.rfind('>');
25842592
bool templFp = false;

src/scanner.l

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5317,14 +5317,22 @@ NONLopt [^\n]*
53175317
yyextra->current->fileName = yyextra->fileName;
53185318
yyextra->current->startLine = yyextra->yyBegLineNr;
53195319
yyextra->current->startColumn = yyextra->yyBegColNr;
5320-
static const reg::Ex re(R"(\([^)]*[*&][^)]*\))");
5320+
static const reg::Ex re(R"(\([^)]*[*&][^)]*\))"); // e.g. (...*...)
53215321
reg::Match match;
53225322
std::string type = yyextra->current->type.str();
53235323
int ti=-1;
53245324
if (reg::search(type,match,re))
53255325
{
53265326
ti = (int)match.position();
53275327
}
5328+
if (ti!=-1)
5329+
{
5330+
int di = yyextra->current->type.find("decltype(");
5331+
if (di!=-1 && di<ti) // decltype(...(...*...) -> normal return type
5332+
{
5333+
ti=-1;
5334+
}
5335+
}
53285336
int ts=yyextra->current->type.find('<');
53295337
int te=yyextra->current->type.findRev('>');
53305338

0 commit comments

Comments
 (0)