Skip to content

Commit a4d5ad4

Browse files
committed
address review feedback
1 parent e25581d commit a4d5ad4

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

clang-tools-extra/clang-doc/Serialize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,8 @@ template <typename T>
525525
static void populateInfo(Info &I, const T *D, const FullComment *C,
526526
bool &IsInAnonymousNamespace) {
527527
I.USR = getUSRForDecl(D);
528-
auto ConversionDecl = dyn_cast_or_null<CXXConversionDecl>(D);
529-
if (ConversionDecl && ConversionDecl->getConversionType()
528+
if (auto ConversionDecl = dyn_cast_or_null<CXXConversionDecl>(D);
529+
ConversionDecl && ConversionDecl->getConversionType()
530530
.getTypePtr()
531531
->isTemplateTypeParmType())
532532
I.Name = "operator " + ConversionDecl->getConversionType().getAsString();
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
// CHECK-YAML: Name: 'operator T'
15+
16+
// CHECK-HTML: <h3 id='{{[0-9A-F]*}}'>operator T</h3>
17+
// CHECK-HTML: <p>public T operator T</p>

0 commit comments

Comments
 (0)