Skip to content

Commit 8268794

Browse files
authored
[clang-doc] Precommit test for correct conversion function names (#141168)
1 parent b79a624 commit 8268794

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: rm -rf %t && mkdir -p %t
2+
3+
// RUN: clang-doc --output=%t --executor=standalone %s
4+
// RUN: find %t/ -regex ".*/[0-9A-F]*.yaml" -exec cat {} ";" | FileCheck %s --check-prefix=CHECK-YAML
5+
6+
// RUN: clang-doc --format=html --output=%t --executor=standalone %s
7+
// FileCheck %s --check-prefix=CHECK-HTML
8+
9+
template <typename T>
10+
struct MyStruct {
11+
operator T();
12+
};
13+
14+
// Output incorrect conversion names.
15+
// CHECK-YAML: Name: 'operator type-parameter-0-0'
16+
// CHECK-YAML-NOT: Name: 'operator T'
17+
18+
// CHECK-HTML-NOT: <h3 id='{{[0-9A-F]*}}'>operator T</h3>
19+
// CHECK-HTML-NOT: <p>public T operator T()</p>

0 commit comments

Comments
 (0)