[PATCH] D134128: Resubmit an implemention for constrained template template parameters [P0857R0 Part B]

Liming Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 06:23:00 PDT 2022


lime updated this revision to Diff 466056.
lime added a comment.

> The changes in Sema.h and the changes of CalculateTemplateDepthForConstraints

I think it might be fine now. The above changes are related to `NormalizationCache`. This cache used to take `NamedDecl` as its key. However, as constrains need to be adjusted to different depths, and `p3-2a.cpp` can reproduce the case. Thus, `NameDecl` is not enough, and a heavier key is used. But the needs to adjust the depth seem unique to template-template parameter, so I'm not sure whether there is a better solution. And `IsAtLeastAsConstrained` takes `ArrayRef` as its argument, which leads to new spaces for potentially adjusted constrains. I think `MutableArryRef` could be used here.

BTW, this comment includes an update that involves `git clang-format`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134128/new/

https://reviews.llvm.org/D134128

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Parse/ParseTemplate.cpp
  clang/lib/Sema/SemaConcept.cpp
  clang/test/CXX/temp/temp.arg/temp.arg.template/p3-2a.cpp
  clang/test/SemaTemplate/concepts.cpp
  clang/www/cxx_status.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134128.466056.patch
Type: text/x-patch
Size: 15853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221007/0023c6e2/attachment-0001.bin>


More information about the cfe-commits mailing list