Consolidate and unify initializer list deduction
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 25 Jun 2015 00:25:49 +0000 (00:25 +0000)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Thu, 25 Jun 2015 00:25:49 +0000 (00:25 +0000)
commit3280b3307f67d5b7406c6d8d3b451ddd0aad8832
treeba5570fffdfc28db96bab791ae5864b7f11a0171
parentec3cb573f522cf6748eae8afa5b33f9b65c33d6e
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
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp