Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHannes Vogt2019-09-13 20:09:45 +0000
committerNathan Ridge2019-09-24 05:03:27 +0000
commitaee38fb062025cf9d0d74c0d4f69bd05f064805c (patch)
treedcc125cea5d17d7884dcc3739c95c7d803811159 /core/org.eclipse.cdt.core.tests
parentcf7e1f87c9b0a258c48b4fb3063d2aa4c37111fd (diff)
downloadorg.eclipse.cdt-aee38fb062025cf9d0d74c0d4f69bd05f064805c.tar.gz
org.eclipse.cdt-aee38fb062025cf9d0d74c0d4f69bd05f064805c.tar.xz
org.eclipse.cdt-aee38fb062025cf9d0d74c0d4f69bd05f064805c.zip
Bug 549036 - Init Type(std::initializer_list) from Type{...}
Fix constructor calls of the form Type{...} to a constructor of the form Type(std::initializer_list<T>). So far only Type({...}) was supported. Change-Id: I09e3b8c9c73c30e12c0c370a5c88885079a14746 Signed-off-by: Hannes Vogt <hannes@havogt.de>
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/AST2CPPTests.java14
1 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 40f235a4f4b..adfb3bedc7c 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
@@ -13405,4 +13405,18 @@ public class AST2CPPTests extends AST2CPPTestBase {
public void testAggregateInitOfAnonymousUnion_549362() throws Exception {
parseAndCheckImplicitNameBindings();
}
+
+ // namespace std {
+ // template<typename T> class initializer_list;
+ // }
+ //
+ // struct A {
+ // A(std::initializer_list<int> list)
+ // {}
+ // };
+ //
+ // auto a = A{1, 2};
+ public void testClassFromInitList_549036() throws Exception {
+ parseAndCheckImplicitNameBindings();
+ }
}

Back to the top