[libcxx-commits] [clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)
Erich Keane via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 19 06:10:08 PDT 2025
================
@@ -28,10 +28,19 @@ namespace clang {
class ConceptDecl;
class TemplateDecl;
+class ConceptReference;
class Expr;
class NamedDecl;
struct PrintingPolicy;
+/// Pairs of unsatisfied atomic constraint expressions along with the
+/// substituted constraint expr, if the template arguments could be
+/// substituted into them, or a diagnostic if substitution resulted in
+/// an invalid expression.
+using UnsatisfiedConstraintRecord =
+ llvm::PointerUnion<const Expr *, const ConceptReference *,
+ std::pair<SourceLocation, StringRef> *>;
----------------
erichkeane wrote:
I guess that is better. Would be nice if each had a name/it was its own `union` type (I actually missed with the old one that it was union-of-three-struct-pointers and not struct with union-of-two-struct-pointers-plus-struct(pair).
Would be nice if we didn't have to store this as well, only thing we could really do is change the StringRef to be a handful of enums that would let us re-create it, but not sure how that would be much/any better.
https://github.com/llvm/llvm-project/pull/141776
More information about the libcxx-commits
mailing list