aboutsummaryrefslogtreecommitdiff
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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Parser/cxx11-brace-initializers.cpp b/test/Parser/cxx11-brace-initializers.cpp
index 7926320fd021..820344c57836 100644
--- a/test/Parser/cxx11-brace-initializers.cpp
+++ b/test/Parser/cxx11-brace-initializers.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
-// expected-no-diagnostics
struct S {
S(int, int) {}
@@ -25,3 +24,6 @@ namespace PR14948 {
template<typename T> T Q<T>::x {};
}
+
+int conditional1 = 1 ? {} : 0; // expected-error {{initializer list cannot be used on the right hand side of operator '?'}}
+int conditional2 = 1 ? 0 : {}; // expected-error {{initializer list cannot be used on the right hand side of operator ':'}}