summaryrefslogtreecommitdiffstats
path: root/test/Parser/cxx11-brace-initializers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx11-brace-initializers.cpp')
-rw-r--r--test/Parser/cxx11-brace-initializers.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Parser/cxx11-brace-initializers.cpp b/test/Parser/cxx11-brace-initializers.cpp
new file mode 100644
index 0000000..a210205
--- /dev/null
+++ b/test/Parser/cxx11-brace-initializers.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+// expected-no-diagnostics
+
+struct S {
+ S(int, int) {}
+};
+
+void f(int, S const&, int) {}
+
+void test1()
+{
+ S X1{1, 1,};
+ S X2 = {1, 1,};
+
+ f(0, {1, 1}, 0);
+}
OpenPOWER on IntegriCloud