Skip to content

Commit

Permalink
issue #9274: Automatic links not working in examples that use C++ sou…
Browse files Browse the repository at this point in the history
…rce [Potential Bug]
  • Loading branch information
doxygen committed May 1, 2022
1 parent d1236ef commit d18ed15
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/code.l
Original file line number Diff line number Diff line change
Expand Up @@ -2889,20 +2889,20 @@ static void generateClassOrGlobalLink(yyscan_t yyscanner,
if (i!=-1) bareName = bareName.left(i);

auto checkForClass = [&yyg,&bareName,&className](const Definition *d,
const ClassDef *&cd,const MemberDef *&md)
const ClassDef *&cd_,const MemberDef *&md_)
{
cd = yyextra->symbolResolver.resolveClass(d,className);
md = yyextra->symbolResolver.getTypedef();
cd_ = yyextra->symbolResolver.resolveClass(d,className);
md_ = yyextra->symbolResolver.getTypedef();
DBG_CTX((stderr,"non-local variable name=%s cd=%s md=%s!\n",
qPrint(className),cd?qPrint(cd->name()):"<none>",
md?qPrint(md->name()):"<none>"));
if (cd==0 && md==0 && !bareName.isEmpty())
qPrint(className),cd_?qPrint(cd_->name()):"<none>",
md_?qPrint(md_->name()):"<none>"));
if (cd_==0 && md_==0 && !bareName.isEmpty())
{
DBG_CTX((stderr,"bareName=%s\n",qPrint(bareName)));
if (bareName!=className)
{
cd = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
md = yyextra->symbolResolver.getTypedef();
cd_ = yyextra->symbolResolver.resolveClass(d,bareName); // try unspecialized version
md_ = yyextra->symbolResolver.getTypedef();
}
}
};
Expand Down

0 comments on commit d18ed15

Please sign in to comment.