@@ -21,12 +21,9 @@ namespace doc {
21
21
static llvm::StringSet USRVisited;
22
22
static llvm::sys::Mutex USRVisitedGuard;
23
23
24
-
25
- template <typename T> bool isTypedefAnonRecord (const T* D) {
24
+ template <typename T> bool isTypedefAnonRecord (const T *D) {
26
25
if (const auto *C = dyn_cast<CXXRecordDecl>(D)) {
27
- if (const TypedefNameDecl *TD = C->getTypedefNameForAnonDecl ()) {
28
- return true ;
29
- }
26
+ return C->getTypedefNameForAnonDecl ();
30
27
}
31
28
return false ;
32
29
}
@@ -35,8 +32,8 @@ void MapASTVisitor::HandleTranslationUnit(ASTContext &Context) {
35
32
TraverseDecl (Context.getTranslationUnitDecl ());
36
33
}
37
34
38
- template <typename T> bool MapASTVisitor::mapDecl ( const T *D,
39
- bool IsDefinition) {
35
+ template <typename T>
36
+ bool MapASTVisitor::mapDecl ( const T *D, bool IsDefinition) {
40
37
// If we're looking a decl not in user files, skip this decl.
41
38
if (D->getASTContext ().getSourceManager ().isInSystemHeader (D->getLocation ()))
42
39
return true ;
@@ -80,7 +77,7 @@ template <typename T> bool MapASTVisitor::mapDecl(const T *D,
80
77
}
81
78
82
79
bool MapASTVisitor::VisitNamespaceDecl (const NamespaceDecl *D) {
83
- return mapDecl (D, true );
80
+ return mapDecl (D, /* isDefinition= */ true );
84
81
}
85
82
86
83
bool MapASTVisitor::VisitRecordDecl (const RecordDecl *D) {
@@ -103,11 +100,11 @@ bool MapASTVisitor::VisitFunctionDecl(const FunctionDecl *D) {
103
100
}
104
101
105
102
bool MapASTVisitor::VisitTypedefDecl (const TypedefDecl *D) {
106
- return mapDecl (D, true );
103
+ return mapDecl (D, /* isDefinition= */ true );
107
104
}
108
105
109
106
bool MapASTVisitor::VisitTypeAliasDecl (const TypeAliasDecl *D) {
110
- return mapDecl (D, true );
107
+ return mapDecl (D, /* isDefinition= */ true );
111
108
}
112
109
113
110
comments::FullComment *
0 commit comments