diff options
author | albert-github <albert.tests@gmail.com> | 2019-08-02 09:40:00 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-08-02 09:40:00 (GMT) |
commit | 7a10b6e784bf1ed882157471038e174df850b06c (patch) | |
tree | d6af0bbe791ca3c30a300e74b0ff04f18a9ac2af /src | |
parent | f16a63d6d5d9fd11a2f1c57bdfad7f1d4b175f0e (diff) | |
download | Doxygen-7a10b6e784bf1ed882157471038e174df850b06c.zip Doxygen-7a10b6e784bf1ed882157471038e174df850b06c.tar.gz Doxygen-7a10b6e784bf1ed882157471038e174df850b06c.tar.bz2 |
Regression: unbalanced grouping commands
Regression on #7122 (and #7115 / #7116).
When having multiple consecutive `\name` sections the warning "unbalanced grouping commands" appears
Analogous to the open command also the close command needs an implicit argument.
Diffstat (limited to 'src')
-rw-r--r-- | src/commentscan.l | 2 | ||||
-rw-r--r-- | src/docgroup.cpp | 17 | ||||
-rw-r--r-- | src/docgroup.h | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index a52821c..933bd59 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2545,7 +2545,7 @@ static bool handleName(const QCString &, const QCStringList &) BEGIN( NameParam ); if (!Doxygen::docGroup.isEmpty()) // end of previous member group { - Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE); + Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE,true); } } return stop; diff --git a/src/docgroup.cpp b/src/docgroup.cpp index 2dcca70..1f4fb6d 100644 --- a/src/docgroup.cpp +++ b/src/docgroup.cpp @@ -119,15 +119,18 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit) } } -void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline) +void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit) { - if (m_openCount < 1) + if (!implicit) { - warn(fileName,line,"unbalanced grouping commands"); - } - else - { - m_openCount--; + if (m_openCount < 1) + { + warn(fileName,line,"unbalanced grouping commands"); + } + else + { + m_openCount--; + } } //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n", // e->name.data(),e->section,fileName,line,m_autoGroupStack.count()); diff --git a/src/docgroup.h b/src/docgroup.h index 4ce9af9..738b748 100644 --- a/src/docgroup.h +++ b/src/docgroup.h @@ -33,7 +33,7 @@ class DocGroup void enterCompound(const char *fileName,int line,const char *name); void leaveCompound(const char *,int,const char * /*name*/); void open(Entry *e,const char *,int,bool implicit=false); - void close(Entry *e,const char *fileName,int line,bool foundInline); + void close(Entry *e,const char *fileName,int line,bool foundInline,bool imlicit=false); void initGroupInfo(Entry *e); bool isEmpty() const; void clearHeader(); |