commit | 2835745a451002798fed9800aeb19277f6a8fcb3 | [log] [tgz] |
---|---|---|
author | Sebastian Redl <sebastian.redl@getdesigned.at> | Mon Mar 05 19:35:43 2012 +0000 |
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | Mon Mar 05 19:35:43 2012 +0000 |
tree | 4df2d4e14933a851d5996829205bcb512199a73b | |
parent | abf9d908cce6ffe2ee7b739d98fc7344a4f9fe3b [diff] [blame] |
If the element type of an initializer list has a destructor, make sure we check it. Fixes PR12178. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152048 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp index 775060b..81ce559 100644 --- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -232,3 +232,21 @@ destroyme2 dm2; // CHECK: call void @_ZN10destroyme2D1Ev } + +namespace PR12178 { + struct string { + string(int); + ~string(); + }; + + struct pair { + string a; + int b; + }; + + struct map { + map(std::initializer_list<pair>); + }; + + map m{ {1, 2}, {3, 4} }; +}