================ @@ -353,6 +353,10 @@ static ExprResult calculateConstraintSatisfaction( if (Inst.isInvalid()) return ExprError(); + // An empty expression for substitution failure messages. + if (Template && Template->isInvalidDecl()) + return ExprEmpty(); ---------------- zyn0217 wrote:
My initial thought was to emit substitution details (`[T = double]` here). But now I feel like this is puzzling since we're now giving "constraints not satisfied" rather than "constraint must be of type 'bool'" in the case. I'm a bit torn here: either we lose substitution details or produce inaccurate error-recovery messages. The latter matches what we're doing now in assertion-free builds. https://cpp1.godbolt.org/z/3KzPEYhn3 https://github.com/llvm/llvm-project/pull/75697 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits