@@ -178,55 +178,6 @@ static llvm::SmallString<16> getTypeAlias(const TypeAliasDecl *Alias) {
178178 return Result;
179179}
180180
181- // extract full syntax for record declaration
182- static llvm::SmallString<16 > getRecordPrototype (const CXXRecordDecl *CXXRD) {
183- llvm::SmallString<16 > Result;
184- LangOptions LangOpts;
185- PrintingPolicy Policy (LangOpts);
186- Policy.SuppressTagKeyword = false ;
187- Policy.FullyQualifiedName = true ;
188- Policy.IncludeNewlines = false ;
189- llvm::raw_svector_ostream OS (Result);
190- if (const auto *TD = CXXRD->getDescribedClassTemplate ()) {
191- OS << " template <" ;
192- bool FirstParam = true ;
193- for (const auto *Param : *TD->getTemplateParameters ()) {
194- if (!FirstParam)
195- OS << " , " ;
196- Param->print (OS, Policy);
197- FirstParam = false ;
198- }
199- OS << " >\n " ;
200- }
201-
202- if (CXXRD->isStruct ())
203- OS << " struct " ;
204- else if (CXXRD->isClass ())
205- OS << " class " ;
206- else if (CXXRD->isUnion ())
207- OS << " union " ;
208-
209- OS << CXXRD->getNameAsString ();
210-
211- // We need to make sure we have a good enough declaration to check. In the
212- // case where the class is a forward declaration, we'll fail assertions in
213- // DeclCXX.
214- if (CXXRD->isCompleteDefinition () && CXXRD->getNumBases () > 0 ) {
215- OS << " : " ;
216- bool FirstBase = true ;
217- for (const auto &Base : CXXRD->bases ()) {
218- if (!FirstBase)
219- OS << " , " ;
220- if (Base.isVirtual ())
221- OS << " virtual " ;
222- OS << getAccessSpelling (Base.getAccessSpecifier ()) << " " ;
223- OS << Base.getType ().getAsString (Policy);
224- FirstBase = false ;
225- }
226- }
227- return Result;
228- }
229-
230181// A function to extract the appropriate relative path for a given info's
231182// documentation. The path returned is a composite of the parent namespaces.
232183//
@@ -1033,7 +984,6 @@ emitInfo(const RecordDecl *D, const FullComment *FC, Location Loc,
1033984 parseFields (*RI, D, PublicOnly);
1034985
1035986 if (const auto *C = dyn_cast<CXXRecordDecl>(D)) {
1036- RI->FullName = getRecordPrototype (C);
1037987 if (const TypedefNameDecl *TD = C->getTypedefNameForAnonDecl ()) {
1038988 RI->Name = TD->getNameAsString ();
1039989 RI->IsTypeDef = true ;
0 commit comments