1// RUN: rm -rf %t
2// RUN: mkdir %t
3// RUN: echo "" > %t/compile_flags.txt
4// RUN: cp "%s" "%t/test.cpp"
5// RUN: clang-doc --doxygen --public --executor=standalone -p %t %t/test.cpp -output=%t/docs
6// This produces two files, index.yaml and one for the record named by its USR
7// (which we don't know in advance). This checks the record file by searching
8// for a name with a 40-char USR name.
9// RUN: find %t/docs -regex ".*/[0-9A-F]*.yaml" -exec cat {} ";" | FileCheck %s --check-prefix=CHECK
10// RUN: rm -rf %t
11
12class Record {
13private:
14 void function_private();
15
16public:
17 void function_public();
18};
19
20void Record::function_private() {}
21
22void Record::function_public() {}
23
24// CHECK: ---
25// CHECK-NEXT: USR: '{{([0-9A-F]{40})}}'
26// CHECK-NEXT: Name: 'Record'
27// CHECK-NEXT: Path: 'GlobalNamespace'
28// CHECK-NEXT: Namespace:
29// CHECK-NEXT: - Type: Namespace
30// CHECK-NEXT: Name: 'GlobalNamespace'
31// CHECK-NEXT: QualName: 'GlobalNamespace'
32// CHECK-NEXT: DefLocation:
33// CHECK-NEXT: LineNumber: 12
34// CHECK-NEXT: Filename: '{{.*}}'
35// CHECK-NEXT: TagType: Class
36// CHECK-NEXT: ChildFunctions:
37// CHECK-NEXT: - USR: '{{([0-9A-F]{40})}}'
38// CHECK-NEXT: Name: 'function_public'
39// CHECK-NEXT: Namespace:
40// CHECK-NEXT: - Type: Record
41// CHECK-NEXT: Name: 'Record'
42// CHECK-NEXT: QualName: 'Record'
43// CHECK-NEXT: USR: '{{([0-9A-F]{40})}}'
44// CHECK-NEXT: - Type: Namespace
45// CHECK-NEXT: Name: 'GlobalNamespace'
46// CHECK-NEXT: QualName: 'GlobalNamespace'
47// CHECK-NEXT: DefLocation:
48// CHECK-NEXT: LineNumber: 22
49// CHECK-NEXT: Filename: '{{.*}}'
50// CHECK-NEXT: Location:
51// CHECK-NEXT: - LineNumber: 17
52// CHECK-NEXT: Filename: '{{.*}}'
53// CHECK-NEXT: IsMethod: true
54// CHECK-NEXT: Parent:
55// CHECK-NEXT: Type: Record
56// CHECK-NEXT: Name: 'Record'
57// CHECK-NEXT: QualName: 'Record'
58// CHECK-NEXT: USR: '{{([0-9A-F]{40})}}'
59// CHECK-NEXT: ReturnType:
60// CHECK-NEXT: Type:
61// CHECK-NEXT: Name: 'void'
62// CHECK-NEXT: QualName: 'void'
63// CHECK-NEXT: Access: Public
64// CHECK-NEXT: ...
65

source code of clang-tools-extra/test/clang-doc/single-file-public.cpp