summaryrefslogtreecommitdiffstats
path: root/src/doc.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-02-24 18:57:25 (GMT)
commitc7bc295f92f56d1dea369663e058933f550a0187 (patch)
tree81d72027898b1a75221b9ca82b04075277821a9f /src/doc.l
parent9793ce49f1d7641854ef0608b34c1dd2d4891a20 (diff)
downloadDoxygen-c7bc295f92f56d1dea369663e058933f550a0187.zip
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.gz
Doxygen-c7bc295f92f56d1dea369663e058933f550a0187.tar.bz2
Release-1.2.14-20020224
Diffstat (limited to 'src/doc.l')
-rw-r--r--src/doc.l46
1 files changed, 31 insertions, 15 deletions
diff --git a/src/doc.l b/src/doc.l
index 24b3b5f..c519ee4 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -861,7 +861,7 @@ static void writeDotFile(const char *fileName, const char *captionText)
/* ----------------------------------------------------------------- */
-static void checkArgName(const QCString &name)
+static void checkArgName(const QCString &name,bool isParam)
{
hasParamCommand=TRUE;
if (memberDef==0) return; // not a member
@@ -871,31 +871,39 @@ static void checkArgName(const QCString &name)
if (al==0) return; // no argument list
if (!Config_getBool("WARN_IF_UNDOCUMENTED")) return;
+ //printf("name=%s\n",name.data());
static QRegExp re("[a-zA-Z0-9_]+");
int p=0,i=0,l;
while ((i=re.match(name,p,&l))!=-1)
{
QCString aName=name.mid(i,l);
+ //printf("aName=%s\n",aName.data());
ArgumentListIterator ali(*al);
Argument *a;
+ bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali)
{
QCString argName = memberDef->isDefine() ? a->type : a->name;
if (aName==argName)
{
- paramsFound.insert(name,(void *)(0x8));
- return;
+ //printf("adding `%s'\n",aName.data());
+ paramsFound.insert(aName,(void *)(0x8));
+ found=TRUE;
+ break;
}
}
- //printf("member type=%d\n",memberDef->memberType());
- QCString scope=memberDef->getScopeString();
- if (!scope.isEmpty()) scope+="::"; else scope="";
- warn(memberDef->docFile(),memberDef->docLine(),
- "Warning: argument `%s' of command @param "
- "is not found in the argument list of %s%s%s",
- aName.data(),scope.data(),memberDef->name().data(),
- argListToString(al).data()
- );
+ if (!found && isParam)
+ {
+ //printf("member type=%d\n",memberDef->memberType());
+ QCString scope=memberDef->getScopeString();
+ if (!scope.isEmpty()) scope+="::"; else scope="";
+ warn(memberDef->docFile(),memberDef->docLine(),
+ "Warning: argument `%s' of command @param "
+ "is not found in the argument list of %s%s%s",
+ aName.data(),scope.data(),memberDef->name().data(),
+ argListToString(al).data()
+ );
+ }
p=i+l;
}
}
@@ -1749,7 +1757,14 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
<DocScan>"\\capt".*
<DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM}{BSEP}* {
QCString argName = substitute(yytext,"\"","").stripWhiteSpace();
- if (inParamBlock) checkArgName(argName);
+ if (inParamBlock)
+ {
+ checkArgName(argName,TRUE);
+ }
+ else if (inRetValBlock)
+ {
+ checkArgName(argName,FALSE);
+ }
outDoc->startDescTableTitle();
scanDoc(argName);
outDoc->endDescTableTitle();
@@ -2797,9 +2812,10 @@ void parseDoc(OutputDocInterface &od,const char *fileName,int startLine,
argListToString(al).data());
for (ali.toFirst();(a=ali.current());++ali)
{
- if (!a->name.isEmpty() && paramsFound.find(a->name)==0)
+ QCString argName = memberDef->isDefine() ? a->type : a->name;
+ if (!argName.isEmpty() && paramsFound.find(argName)==0)
{
- warn_cont( " parameter %s\n",a->name.data());
+ warn_cont( " parameter %s\n",argName.data());
}
}
}