summaryrefslogtreecommitdiffstats
path: root/clang/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
commiteef474ce1bc865d3192bc335f966ad5ae9efd5a1 (patch)
tree131677639806223d4b2a1db272e06411bed33065 /clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
parentc9dd94685283938a2d9227a0fa448f08d7b19ab4 (diff)
downloadbcm5719-llvm-eef474ce1bc865d3192bc335f966ad5ae9efd5a1.tar.gz
bcm5719-llvm-eef474ce1bc865d3192bc335f966ad5ae9efd5a1.zip
Fix parsing and processing initializer lists in return statements and as direct member initializers.
llvm-svn: 151155
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r--clang/test/SemaCXX/cxx0x-initializer-constructor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
index f7e89d3227a..2fd30614d14 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/clang/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}}
+ };
}
OpenPOWER on IntegriCloud