[Sema] Do not match function type with const T in template argument deduction
authorLei Liu <lei.liu2@windriver.com>
Thu, 3 May 2018 01:43:23 +0000 (01:43 +0000)
committerLei Liu <lei.liu2@windriver.com>
Thu, 3 May 2018 01:43:23 +0000 (01:43 +0000)
commit413f3c55955537552b556a556d678d5756a9f16b
tree92e419afe91e967fb8859cc8e9f2c56520ee6535
parent87f1343a73fa56729571fb93deeb4f795d3e042b
[Sema] Do not match function type with const T in template argument deduction

From http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1584,
function type should not match cv-qualified type in template argument
deduction. This also matches what GCC and EDG do in template argument
deduction.

Differential Revision: https://reviews.llvm.org/D45755

llvm-svn: 331424
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/CXX/drs/dr15xx.cpp
clang/test/CXX/drs/dr4xx.cpp
clang/test/SemaTemplate/function-pointer-qualifier.cpp [new file with mode: 0644]