Fix parsing of C++ classes contain attributes with bitfields (patch by Lex Trotman, thanks).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4962 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2010-05-30 17:48:08 +00:00
parent 88b6d076e5
commit b0abe6b381
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,9 @@
* tagmanager/sort.c:
Replace free() by g_free() (patch by Daniel Marjamaki, thanks).
* tagmanager/c.c:
Fix parsing of C++ classes contain attributes with bitfields
(patch by Lex Trotman, thanks).
2010-05-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -2555,13 +2555,15 @@ static void processColon (statementInfo *const st)
else
{
cppUngetc (c);
if (((isLanguage (Lang_cpp) || isLanguage (Lang_csharp) || isLanguage (Lang_vala)) &&
if ((((isLanguage (Lang_cpp) &&
(st->declaration == DECL_CLASS || st->declaration == DECL_STRUCT)) ||
isLanguage (Lang_csharp) || isLanguage (Lang_vala)) &&
inheritingDeclaration (st->declaration)) ||
isLanguage (Lang_d))
{
readParents (st, ':');
}
else if (parentDecl (st) == DECL_STRUCT)
else if (parentDecl (st) == DECL_STRUCT || parentDecl (st) == DECL_CLASS)
{
c = skipToOneOf (",;");
if (c == ',')