aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-initializer-constructor.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2012-02-22 10:50:08 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2012-02-22 10:50:08 +0000
commit33deb35535aebe81bed0eaf5c14f3032276a086e (patch)
tree1a6b786fd11d1fd4d8c083f85419739e12012c4b /test/SemaCXX/cxx0x-initializer-constructor.cpp
parent76517426dc8bf7734c07eefc35171a6bfdba1a2b (diff)
Fix parsing and processing initializer lists in return statements and as direct member initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r--test/SemaCXX/cxx0x-initializer-constructor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-constructor.cpp b/test/SemaCXX/cxx0x-initializer-constructor.cpp
index f7e89d3227..2fd30614d1 100644
--- a/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -153,9 +153,9 @@ namespace objects {
G(std::initializer_list<int>, T ...); // expected-note 3 {{not viable}}
};
- struct H { // expected-note 6 {{not viable}}
+ struct H { // expected-note 8 {{not viable}}
explicit H(int, int); // expected-note 3 {{not viable}}
- H(int, void*); // expected-note 3 {{not viable}}
+ H(int, void*); // expected-note 4 {{not viable}}
};
void edge_cases() {
@@ -186,4 +186,11 @@ namespace objects {
(void) new H{1, 2};
(void) H{1, 2};
}
+
+ struct memberinit {
+ H h1{1, nullptr};
+ H h2 = {1, nullptr};
+ H h3{1, 1};
+ H h4 = {1, 1}; // expected-error {{no matching constructor}}
+ };
}