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

Saar Raz via All-commits all-commits at lists.llvm.org
Fri Jan 31 06:01:19 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b32963252bc8580ad8237ded3814e2a6a2ba9b6
      https://github.com/llvm/llvm-project/commit/3b32963252bc8580ad8237ded3814e2a6a2ba9b6
  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).

(cherry picked from commit ba1f3db4b0729ad932aa4f091e9578132d98a0c8)




More information about the All-commits mailing list