[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:04 PDT 2024
================
@@ -143,13 +148,116 @@ struct NormalizedConstraint {
return Constraint.get<AtomicConstraint *>();
}
+ FoldExpandedConstraint *getFoldExpandedConstraint() const {
+ assert(isFoldExpanded() &&
+ "getFoldExpandedConstraint called on non-fold-expanded constraint.");
+ return Constraint.get<FoldExpandedConstraint *>();
+ }
+
private:
static std::optional<NormalizedConstraint>
fromConstraintExprs(Sema &S, NamedDecl *D, ArrayRef<const Expr *> E);
static std::optional<NormalizedConstraint>
fromConstraintExpr(Sema &S, NamedDecl *D, const Expr *E);
};
+struct FoldExpandedConstraint {
+ enum class FoldOperatorKind { FoAnd, FoOr } Kind;
----------------
AaronBallman wrote:
Do we need the `Fo` prefix since this is a scoped enumeration anyway?
https://github.com/llvm/llvm-project/pull/98160
More information about the cfe-commits
mailing list