[Sema] Use a TreeTransform to extract deduction guide parameter types
authorErik Pilkington <erik.pilkington@gmail.com>
Fri, 27 Jul 2018 21:23:48 +0000 (21:23 +0000)
committerErik Pilkington <erik.pilkington@gmail.com>
Fri, 27 Jul 2018 21:23:48 +0000 (21:23 +0000)
commit69770d3d7a7b988c6f846ca9100b7fdaeac170a1
tree8156744f342fa651b7963508349b4aed2a092172
parenta67c4137c365e0169f0eb1248742bc635a8116db
[Sema] Use a TreeTransform to extract deduction guide parameter types

Previously, we just canonicalized the type, but this lead to crashes with
parameter types that referred to ParmVarDecls of the constructor. There may be
more cases that this TreeTransform needs to handle though, such as a constructor
parameter type referring to a member in an unevaluated context. Canonicalization
doesn't address these cases either though, so we can address them as-needed in
follow-up commits.

rdar://41330135

Differential revision: https://reviews.llvm.org/D49439

llvm-svn: 338165
clang/lib/Sema/SemaTemplate.cpp
clang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp