[PATCH] D133052: [clang] Avoid crash when expanding conversion templates in concepts.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 31 08:54:05 PDT 2022


erichkeane added a comment.

In D133052#3896663 <https://reviews.llvm.org/D133052#3896663>, @luken-google wrote:

> Because of the change to `InsertNode` to not assert on already cached concepts this patch now works. If I try to catch the recursive expansion on a higher level the test in `concepts.cpp` for 2-level concept expansion fails. There are some finite recursive use cases for template expansion.

Note that I'm still working on the recursive concept-check (see https://reviews.llvm.org/D136975), and will probably get this part fixed in the next day or two.

I don't know that we can really use the Sema::InstantiatingTemplate bit, as that doesn't really work in cases where we are forming a recovery expression, or the concept caused us to instantiate the same concepts separately somewhere else (like when evaluating the constexprness of a move constructor is the other good example).

Additionally, I think any such check needs to happen at the 'expression' level itself, rather than here at the function.

My biggest problem at the moment is making sure it fails overlaod resolution entirely, rather than just the single candidate (which this has the same problem I believe).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133052



More information about the cfe-commits mailing list