Skip to content

Commit d09998b

Browse files
committed
issue #10937 unexpected token TK_COMMAND_BS as the argument of \ifile
In case a reference for `\copy...` is coming from a tag file there is no information present and this was not reported.
1 parent d51b6df commit d09998b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/docparser.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,14 @@ QCString DocParser::processCopyDoc(const char *data,size_t &len)
18461846
const Definition *def = nullptr;
18471847
QCString doc,brief;
18481848
//printf("resolving docs='%s'\n",qPrint(id));
1849-
if (findDocsForMemberOrCompound(id,&doc,&brief,&def))
1849+
bool found = findDocsForMemberOrCompound(id,&doc,&brief,&def);
1850+
if (found && def->isReference())
1851+
{
1852+
warn_doc_error(context.fileName,tokenizer.getLineNr(),
1853+
"@copy%s or @copydoc target '%s' found but is from a tag file, skipped", isBrief?"brief":"details",
1854+
qPrint(id));
1855+
}
1856+
else if (found)
18501857
{
18511858
//printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
18521859
auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);

0 commit comments

Comments
 (0)