[clang] [Clang] Ensure compound requirements do not contain placeholder expressions (PR #162618)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 06:08:20 PDT 2025


================
@@ -3200,6 +3200,8 @@ ExprResult Parser::ParseRequiresExpression() {
         BalancedDelimiterTracker ExprBraces(*this, tok::l_brace);
         ExprBraces.consumeOpen();
         ExprResult Expression = ParseExpression();
+        if (Expression.isUsable())
+          Expression = Actions.CheckPlaceholderExpr(Expression.get());
----------------
cor3ntin wrote:

Not easily, these things return a requirement, not an expression - I started doing that this morning but i feel is was less clear.

https://github.com/llvm/llvm-project/pull/162618


More information about the cfe-commits mailing list