[all-commits] [llvm/llvm-project] 1ac1c4: [Concepts] Instantiate invented template type para...

Saar Raz via All-commits all-commits at lists.llvm.org
Mon Feb 3 06:53:24 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ac1c4b4850c1a507caa7da068f44a45ef4ba3c7
      https://github.com/llvm/llvm-project/commit/1ac1c4b4850c1a507caa7da068f44a45ef4ba3c7
  Author: Saar Raz <saar at raz.email>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    A clang/test/SemaTemplate/instantiate-abbreviated-template.cpp

  Log Message:
  -----------
  [Concepts] Instantiate invented template type parameter type-constraint along with function parameters

We previously instantiated type-constraints of template type parameters along with the type parameter itself,
this caused problems when the type-constraints created by abbreviated templates refreneced other parameters
in the abbreviated templates.

When encountering a template type parameter with a type constraint, if it is implicit, delay instantiation of
the type-constraint until the function parameter which created the invented template type parameter is
instantiated.

Reland after fixing bug caused by another flow reaching SubstParmVarDecl and instantiating the TypeConstraint
a second time.

(cherry picked from commit 84959ae47f447fca9d56a9c61e8c46e993d0387a)




More information about the All-commits mailing list