diff options
author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2015-06-25 00:25:49 +0000 |
---|---|---|
committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2015-06-25 00:25:49 +0000 |
commit | 3280b3307f67d5b7406c6d8d3b451ddd0aad8832 (patch) | |
tree | ba5570fffdfc28db96bab791ae5864b7f11a0171 /clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | |
parent | ec3cb573f522cf6748eae8afa5b33f9b65c33d6e (diff) | |
download | bcm5719-llvm-3280b3307f67d5b7406c6d8d3b451ddd0aad8832.tar.gz bcm5719-llvm-3280b3307f67d5b7406c6d8d3b451ddd0aad8832.zip |
Consolidate and unify initializer list deduction
Summary:
This patch reduces duplication in the template argument deduction code
for handling deduction from initializer lists in a function call. This
extends the fix for PR12119 to also apply to the case where the
corresponding parameter is a trailing parameter pack.
Test Plan:
A test for deduction from nested initializer lists where the
corresponding parameter is a trailing parameter pack is added in
`clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp`.
Reviewers: fraggamuffin, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10681
llvm-svn: 240612
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp index a78f022e84c..9456dd713aa 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -275,3 +275,10 @@ namespace TemporaryInitListSourceRange_PR22367 { {0} ); } + +namespace ParameterPackNestedInitializerLists_PR23904c3 { + template <typename ...T> + void f(std::initializer_list<std::initializer_list<T>> ...tt); + + void foo() { f({{0}}, {{'\0'}}); } +} |