(PR46111) Properly handle elaborated types in an implicit deduction guide
authorErich Keane <erich.keane@intel.com>
Thu, 28 May 2020 17:25:53 +0000 (10:25 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 12 Jun 2020 12:32:13 +0000 (05:32 -0700)
commit82a21229da36bc53004dc54203e3bdeea718c942
tree880fe226b7db572e4a75ab50eb35772db1823914
parente22f1c02a27f4471af1b9ae3aa6d8324b86ab2d0
(PR46111) Properly handle elaborated types in an implicit  deduction guide

As reported in PR46111, implicit instantiation of a deduction guide
causes us to have an elaborated type as the parameter, rather than the
dependent type.

After review and feedback from @rsmith, this patch solves this problem
by wrapping the value in an uninstantiated typedef/type-alias that is
instantiated when required later.

Differential Revision: https://reviews.llvm.org/D80743
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/AST/deduction-guides.cpp [new file with mode: 0644]