From 25d7933d7a64a589c479da38df4bbe204bd9e53a Mon Sep 17 00:00:00 2001 From: Erik Verbruggen <erik.verbruggen@nokia.com> Date: Thu, 27 May 2010 14:22:13 +0200 Subject: [PATCH] Fixed __attribute__ parsing after struct declarations. Task-number: QTCREATORBUG-1358 Reviewed-by: Roberto Raggi --- src/shared/cplusplus/Parser.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/shared/cplusplus/Parser.cpp b/src/shared/cplusplus/Parser.cpp index 0b7ad74214d..325135838ef 100644 --- a/src/shared/cplusplus/Parser.cpp +++ b/src/shared/cplusplus/Parser.cpp @@ -3633,10 +3633,14 @@ bool Parser::maybeForwardOrClassDeclaration(SpecifierListAST *decl_specifier_seq if (it) { SpecifierAST *spec = it->value; - if (! it->next && (spec->asElaboratedTypeSpecifier() || - spec->asEnumSpecifier() || - spec->asClassSpecifier())) + if (spec->asElaboratedTypeSpecifier() || + spec->asEnumSpecifier() || + spec->asClassSpecifier()) { + for (it = it->next; it; it = it->next) + if (it->value->asAttributeSpecifier() == 0) + return false; return true; + } } } -- GitLab