[clang] [Clang][C++26] Implement "Ordering of constraints involving fold expressions (PR #98160)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 09:07:05 PDT 2024
================
@@ -177,77 +178,180 @@ struct SatisfactionStackRAII {
};
} // namespace
-template <typename AtomicEvaluator>
+template <typename ConstraintEvaluator>
static ExprResult
calculateConstraintSatisfaction(Sema &S, const Expr *ConstraintExpr,
ConstraintSatisfaction &Satisfaction,
- AtomicEvaluator &&Evaluator) {
- ConstraintExpr = ConstraintExpr->IgnoreParenImpCasts();
+ ConstraintEvaluator &&Evaluator);
- if (LogicalBinOp BO = ConstraintExpr) {
- size_t EffectiveDetailEndIndex = Satisfaction.Details.size();
- ExprResult LHSRes = calculateConstraintSatisfaction(
- S, BO.getLHS(), Satisfaction, Evaluator);
+template <typename ConstraintEvaluator>
+static ExprResult calculateConstraintSatisfaction(
+ Sema &S, const Expr *LHS, OverloadedOperatorKind Op, const Expr *RHS,
+ ConstraintSatisfaction &Satisfaction, ConstraintEvaluator &Evaluator) {
----------------
AaronBallman wrote:
Should `Evaluator` be `&&` and not `&`?
https://github.com/llvm/llvm-project/pull/98160
More information about the cfe-commits
mailing list