[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 16:46:22 PDT 2024
================
@@ -153,6 +153,10 @@ RequiresExpr::RequiresExpr(ASTContext &C, SourceLocation RequiresKWLoc,
std::copy(Requirements.begin(), Requirements.end(),
getTrailingObjects<concepts::Requirement *>());
RequiresExprBits.IsSatisfied |= Dependent;
+ RequiresExprBits.IsSatisfied &=
+ llvm::none_of(LocalParameters, [](const ParmVarDecl *Param) {
+ return Param->isInvalidDecl();
+ });
----------------
mizvekov wrote:
I don't understand why we need to say the requires expression is not satisfied if any of the parameters are invalid. This is the consequence of an error, which was already emitted.
This does not seem to lead to better error recovery.
https://github.com/llvm/llvm-project/pull/109831
More information about the cfe-commits
mailing list