
This patch changes JSON file serialization. Now, files are serialized to a single directory instead of nesting them based on namespaces. The global namespace retains the "index.json" name. This solves the problem of class template specializations being serialized to the same file as its base template. This is also planned as part of future integration with the Mustache generator which will consume the JSON files.
30 lines
931 B
C++
30 lines
931 B
C++
// RUN: rm -rf %t && mkdir -p %t
|
|
// RUN: clang-doc --output=%t --format=json --executor=standalone %s
|
|
// RUN: FileCheck %s < %t/_ZTV7MyClass.json
|
|
|
|
template<typename T> struct MyClass {
|
|
T MemberTemplate;
|
|
T method(T Param);
|
|
};
|
|
|
|
// CHECK: "Name": "MyClass",
|
|
// CHECK: "Name": "method",
|
|
// CHECK: "Params": [
|
|
// CHECK-NEXT: {
|
|
// CHECK-NEXT: "Name": "Param",
|
|
// CHECK-NEXT: "Type": "T"
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ],
|
|
// CHECK-NEXT: "ReturnType": {
|
|
// CHECK-NEXT: "IsBuiltIn": false,
|
|
// CHECK-NEXT: "IsTemplate": true,
|
|
// CHECK-NEXT: "Name": "T",
|
|
// CHECK-NEXT: "QualName": "T"
|
|
// CHECK-NEXT: "USR": "0000000000000000000000000000000000000000"
|
|
// CHECK: "Name": "MemberTemplate",
|
|
// CHECK: "Type": "T"
|
|
// CHECK: "Template": {
|
|
// CHECK-NEXT: "Parameters": [
|
|
// CHECK-NEXT: "typename T"
|
|
// CHECK-NEXT: ]
|