Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-05-16 16:27:59 -0400
committerSergey Prigogin2012-05-16 16:27:59 -0400
commite55325538485fe691418c4b50c7a4d947239d95c (patch)
treea6dbf1d10d7052ae4d2cf263cd8770000a1a8c91 /core/org.eclipse.cdt.core.tests
parenta37a37d4c1a8ddfdd70645e36706cf4ca5280d85 (diff)
downloadorg.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.tar.gz
org.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.tar.xz
org.eclipse.cdt-e55325538485fe691418c4b50c7a4d947239d95c.zip
Bug 332829. Parsing support for constexpr keyword. Also added few
new C++11 keywords.
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
index 156d1e97c5..c9e3cbc9c9 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPSpecTest.java
@@ -1184,6 +1184,24 @@ public class AST2CPPSpecTest extends AST2SpecBaseTest {
assertInstance(d, IASTProblemDeclaration.class);
}
+ // constexpr int square(int x);
+ // constexpr int bufsz = 1024;
+ // struct pixel {
+ // int x;
+ // int y;
+ // constexpr pixel(int);
+ // };
+ // constexpr pixel::pixel(int a)
+ // : x(square(a)), y(square(a))
+ // { }
+ // constexpr int square(int x) {
+ // return x * x;
+ // }
+ // constexpr pixel large(4);
+ public void test7_1_5s1() throws Exception {
+ parse(getAboveComment(), ParserLanguage.CPP, true, 0);
+ }
+
// int foo() {
// const int ci = 3; // cvqualified (initialized as required)
// ci = 4; // illformed: attempt to modify const

Back to the top