================ @@ -0,0 +1,29 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --extra-arg -std=c++20 --output=%t --format=json --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.json + +template<typename T> +concept Addable = requires(T a, T b) { + { a + b }; +}; + +template<typename T> +requires Addable<T> +struct MyClass { +}; + +// CHECK: "Name": "MyClass", +// CHECK-NEXT: "Namespace": [ +// CHECK-NEXT: "GlobalNamespace" +// CHECK-NEXT: ], +// CHECK-NEXT: "Path": "GlobalNamespace", +// CHECK-NEXT: "TagType": "struct", +// CHECK-NEXT: "Template": { +// CHECK-NOT: "Constraints": [ +// CHECK-NOT: "Addable<T>" ---------------- evelez7 wrote:
Interesting thing about Constraints in the context of Clang-Doc is that we don't get back any Decls AFAIK, so I can't construct this as a Reference like BaseRecords. Which is unfortunate in terms of linking. Might be able to find a way to do this but I don't know much about how `Expr` works. https://github.com/llvm/llvm-project/pull/144160 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits