[llvm-branch-commits] [clang-tools-extra] [clang-doc] add support for concepts (PR #144430)

Paul Kirth via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 20 10:00:52 PDT 2025


================
@@ -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


More information about the llvm-branch-commits mailing list