Apply adjustment to function- and array-typed non-type template
parameters (per C++ [temp.param]p8) when computing the type of a
reference to a non-type template parameter. Fixes <rdar://problem/13000548>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172585 91177308-0d34-0410-b5e6-96231b3b80d8
One can have an unavailable method overridden by an available method,
but not vice-versa. Fix bug introduced in r172567 and noticed by
Jordan, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172586 91177308-0d34-0410-b5e6-96231b3b80d8