Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-15 07:58:54 +0000
committerMarkus Schorn2008-04-15 07:58:54 +0000
commit51f43ad2c5fbc221325da1867538d06d2979bb78 (patch)
treeea214e71e2efb78b6522788a3727087ef40df69d /core/org.eclipse.cdt.core
parent9594a52283a67833d55266d600902b09324215b7 (diff)
downloadorg.eclipse.cdt-51f43ad2c5fbc221325da1867538d06d2979bb78.tar.gz
org.eclipse.cdt-51f43ad2c5fbc221325da1867538d06d2979bb78.tar.xz
org.eclipse.cdt-51f43ad2c5fbc221325da1867538d06d2979bb78.zip
Attributes in elaborated type specifiers, bug 227085.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java3
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
index 3aec4eb220..b98e456622 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/GNUCSourceParser.java
@@ -1528,6 +1528,9 @@ public class GNUCSourceParser extends AbstractGNUSourceCodeParser {
backup(t);
throwBacktrack(t.getOffset(), t.getLength());
}
+
+ // if __attribute__ or __declspec occurs after struct/union/class and before the identifier
+ __attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
IToken identifier = identifier();
IASTName name = createName(identifier);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
index 9480aa2067..c6881faa3b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java
@@ -3285,6 +3285,9 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
throwBacktrack(t.getOffset(), t.getLength());
}
+ // if __attribute__ or __declspec occurs after struct/union/class and before the identifier
+ __attribute_decl_seq(supportAttributeSpecifiers, supportDeclspecSpecifiers);
+
IASTName name = createName(name());
ICPPASTElaboratedTypeSpecifier elaboratedTypeSpec = createElaboratedTypeSpecifier();

Back to the top