[clang] [Concepts] Avoid substituting into constraints for invalid TemplateDecls (PR #75697)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 02:21:20 PST 2023
================
@@ -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();
----------------
cor3ntin wrote:
Can you explain why not return ExprError here? Does it just produce more diagnostics?
https://github.com/llvm/llvm-project/pull/75697
More information about the cfe-commits
mailing list