[Concepts] Correctly handle failure when checking concepts recursively
Based on discussion on the core reflector, it was made clear that a concept that depends on itself should be a hard error, not a constraint failure. This patch implements a stack of constraint-checks-in-progress to make sure we quit, rather than hitting stack-exhaustion. Note that we DO need to be careful to make sure we still check constraints properly that are caused by a previous constraint, but not derived from (such as when a check causes us to check special member function generation), so we cannot use the existing logic to see if this is being instantiated. This fixes https://github.com/llvm/llvm-project/issues/44304 and https://github.com/llvm/llvm-project/issues/50891. Differential Revision: https://reviews.llvm.org/D136975
Loading
Please sign in to comment