[clang] Instantiate concepts with sugared template arguments
authorMatheus Izvekov <mizvekov@gmail.com>
Sun, 23 Oct 2022 09:37:20 +0000 (11:37 +0200)
committerMatheus Izvekov <mizvekov@gmail.com>
Thu, 27 Oct 2022 04:18:53 +0000 (06:18 +0200)
commitb8064374b217db061213c561ec8f3376681ff9c8
tree4f4e049e2baabb6d60372f67d369a654399940b1
parent59f0827e2cf3755834620e7e0b6d946832440f80
[clang] Instantiate concepts with sugared template arguments

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@gmail.com>
Differential Revision: https://reviews.llvm.org/D136566
15 files changed:
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Serialization/ASTReaderDecl.cpp
clang/test/AST/ast-dump-concepts.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