Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Stornelli2020-01-18 08:27:52 +0000
committerMarco Stornelli2020-01-19 10:28:15 +0000
commitb5cde3b61c728b73e686a0f19c9954ff229c10d5 (patch)
tree86ead462e52fd456afd391169d1e54ec07fa009d /core/org.eclipse.cdt.core.tests
parent2c266d91fcbbf0c542797d6ee5c393c8feec6905 (diff)
downloadorg.eclipse.cdt-b5cde3b61c728b73e686a0f19c9954ff229c10d5.tar.gz
org.eclipse.cdt-b5cde3b61c728b73e686a0f19c9954ff229c10d5.tar.xz
org.eclipse.cdt-b5cde3b61c728b73e686a0f19c9954ff229c10d5.zip
Bug 559313 - decltype evaluated as a write operation
If a variable is in a decl type specifier can't be evaluated as written. Change-Id: If78a567dab99e55c78e16c3b7f10c45bbd0a0606 Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
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/VariableReadWriteFlagsTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/VariableReadWriteFlagsTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/VariableReadWriteFlagsTest.java
index 5eb63ee3714..a0111a56922 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/VariableReadWriteFlagsTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/VariableReadWriteFlagsTest.java
@@ -245,4 +245,16 @@ public class VariableReadWriteFlagsTest extends AST2TestBase {
a.assertReadWriteFlags("a = arr[0];", "arr", READ);
a.assertReadWriteFlags("return arr[0];", "arr", READ);
}
+
+ // class Test {
+ // public:
+ // int v;
+ // void test() const {
+ // decltype(v) o = 14;
+ // }
+ // };
+ public void testDeclType() throws Exception {
+ AssertionHelper a = getCPPAssertionHelper();
+ a.assertReadWriteFlags("decltype(v) o = 14;", "v", READ);
+ }
}

Back to the top