[all-commits] [llvm/llvm-project] ba1f3d: [Concepts] Correctly form initial parameter mappin...

Saar Raz via All-commits all-commits at lists.llvm.org
Fri Jan 31 05:59:51 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ba1f3db4b0729ad932aa4f091e9578132d98a0c8
      https://github.com/llvm/llvm-project/commit/ba1f3db4b0729ad932aa4f091e9578132d98a0c8
  Author: Saar Raz <saar at raz.email>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

  Changed paths:
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaConcept.h
    M clang/lib/Sema/SemaConcept.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
    A clang/test/SemaTemplate/instantiate-template-argument.cpp

  Log Message:
  -----------
  [Concepts] Correctly form initial parameter mapping for parameter packs, support substitution into SubstNonTypeTemplateParmExpr

We previously would not correctly for the initial parameter mapping for variadic template parameters in Concepts.
Testing this lead to the discovery that with the normalization process we would need to substitute into already-substituted-into
template arguments, which means we need to add NonTypeTemplateParmExpr support to TemplateInstantiator.
We do that by substituting into the replacement and the type separately, and then re-checking the expression against the NTTP
with the new type, in order to form any new required implicit casts (for cases where the type of the NTTP was dependent).




More information about the All-commits mailing list