Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java')
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2CPPTests.java10
1 files changed, 10 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 520c156573f..87bd065f7c2 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
@@ -10090,6 +10090,16 @@ public class AST2CPPTests extends AST2TestBase {
assertNotSame(g1, g2);
assertSame(g2, g3);
}
+
+ // int test() {
+ // extern int *e();
+ // if (auto r = e()) { return *r; }
+ // int r = 12;
+ // return r;
+ // }
+ public void testVariableDeclarationInIfStatement() throws Exception {
+ parseAndCheckBindings();
+ }
// class A : A {
// };

Back to the top