Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarkus Schorn2011-07-06 02:17:33 -0400
committerMarkus Schorn2011-07-06 02:18:12 -0400
commit82a3d0c2809615e92303ce430ada5f5840ef9333 (patch)
tree46a9d61f8587e93e12b55f51e15ee0f76c4c75e5 /core
parentc3dbd2cb912fe4ce51efc1226f589dd3943b2671 (diff)
downloadorg.eclipse.cdt-82a3d0c2809615e92303ce430ada5f5840ef9333.tar.gz
org.eclipse.cdt-82a3d0c2809615e92303ce430ada5f5840ef9333.tar.xz
org.eclipse.cdt-82a3d0c2809615e92303ce430ada5f5840ef9333.zip
Bug 351228: Attributes at end of using directive.
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java12
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/GNUCPPSourceParser.java2
2 files changed, 14 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
index c017eb25d0..ff63b87b7c 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java
@@ -5327,6 +5327,18 @@ public class AST2CPPTests extends AST2BaseTest {
parse( getAboveComment(), ParserLanguage.CPP, true, true );
}
+ // namespace outer {
+ // namespace inner {
+ // class foo{};
+ // }
+ // using namespace inner __attribute__((__strong__));
+ // }
+ // outer::foo x;
+ // outer::inner::foo y;
+ public void testAttributeInUsingDirective_351228() throws Exception {
+ parseAndCheckBindings();
+ }
+
// class C {
// public:
// int i;
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 9eb9ba28a4..2d13fb9e1e 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
@@ -1859,6 +1859,8 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
throwBacktrack(offset, endOffset - offset);
}
+ __attribute__();
+
switch (LT(1)) {
case IToken.tSEMI:
case IToken.tEOC:

Back to the top