[PATCH] D136566: [clang] Instantiate concepts with sugared template arguments

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 23 13:55:43 PDT 2022


mizvekov created this revision.
Herald added a project: All.
mizvekov requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Since we don't unique specializations for concepts, we can just instantiate
them with the sugared template arguments, at negligible cost.

If we don't track their specializations, we can't resugar them later
anyway, and that would be more expensive than just instantiating them
sugared in the first place since it would require an additional pass.

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136566

Files:
  clang/lib/Sema/SemaConcept.cpp
  clang/lib/Sema/SemaExprCXX.cpp
  clang/lib/Sema/SemaTemplate.cpp
  clang/lib/Sema/SemaTemplateDeduction.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/compound-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/nested-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/simple-requirement.cpp
  clang/test/CXX/expr/expr.prim/expr.prim.req/type-requirement.cpp
  clang/test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp
  clang/test/CXX/temp/temp.param/p10-2a.cpp
  clang/test/SemaTemplate/cxx2a-constraint-caching.cpp
  clang/test/SemaTemplate/instantiate-requires-expr.cpp
  clang/test/SemaTemplate/pr52970.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136566.470013.patch
Type: text/x-patch
Size: 27641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221023/e207edb0/attachment-0001.bin>


More information about the cfe-commits mailing list