================ @@ -584,6 +613,18 @@ template <> llvm::Error addReference(RecordInfo *I, Reference &&R, FieldId F) { } } +template <> +llvm::Error addReference(ConstraintInfo *I, Reference &&R, FieldId F) { + switch (F) { + case FieldId::F_concept: + I->ConceptRef = std::move(R); + return llvm::Error::success(); + default: + return llvm::createStringError(llvm::inconvertibleErrorCode(), + "invalid type cannot contain Reference"); ---------------- ilovepi wrote:
can we make it more obvious that this is related to concepts somehow? you just have a single arm in the switch, so it may also be preferable to just use an `if`, unless you plan to support more feild types. https://github.com/llvm/llvm-project/pull/144430 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits