Skip to content

Commit 2f99861

Browse files
committed
refactor xml files
1 parent 8c41281 commit 2f99861

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

source/lib/Representation.h

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ struct FunctionInfo;
4141
struct Info;
4242
struct TypedefInfo;
4343

44-
enum class InfoType {
44+
enum class InfoType
45+
{
4546
IT_default,
4647
IT_namespace,
4748
IT_record,
@@ -256,7 +257,7 @@ struct TypeInfo
256257
// template parameter. It is saved in a struct so there is a place to add the
257258
// name and default values in the future if needed.
258259
//
259-
/** A tempalte parameter.
260+
/** A template parameter.
260261
*/
261262
struct TemplateParamInfo
262263
{
@@ -400,26 +401,37 @@ struct Info
400401
{
401402
}
402403

403-
SymbolID USR =
404-
SymbolID(); // Unique identifier for the decl described by this Info.
405-
const InfoType IT = InfoType::IT_default; // InfoType of this particular Info.
406-
SmallString<16> Name; // Unqualified name of the decl.
407-
llvm::SmallVector<Reference, 4>
408-
Namespace; // List of parent namespaces for this decl.
404+
/** Unique identifier for the declaration.
405+
*/
406+
SymbolID USR = SymbolID();
407+
408+
/** Kind of declaration.
409+
*/
410+
InfoType const IT = InfoType::IT_default;
411+
412+
/** Unqualified name.
413+
*/
414+
SmallString<16> Name;
415+
416+
/** In-order List of parent namespaces.
417+
*/
418+
llvm::SmallVector<Reference, 4> Namespace;
409419

410420
Javadoc javadoc;
411-
std::vector<CommentInfo> Description; // Comment description of this decl.
421+
// Comment description of this decl.
422+
std::vector<CommentInfo> Description;
412423

413-
llvm::SmallString<128> Path; // Path of directory where the clang-doc
424+
// Path of directory where the clang-doc
414425
// generated file will be saved
426+
llvm::SmallString<128> Path;
415427

416428
void mergeBase(Info&& I);
417429
bool mergeable(const Info& Other);
418430

419431
llvm::SmallString<16> extractName() const;
420432

421433
/// Returns the file path for this Info relative to CurrentPath.
422-
llvm::SmallString<64> getRelativeFilePath(const StringRef& CurrentPath) const;
434+
llvm::SmallString<64> getRelativeFilePath(llvm::StringRef const& CurrentPath) const;
423435

424436
/// Returns the basename that should be used for this Info.
425437
llvm::SmallString<16> getFileBaseName() const;

source/lib/XML.cpp renamed to source/lib/xml/XML.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ write(
407407
openTag("typedef", {
408408
{ "name", I.Name },
409409
{ "usr", toBase64(I.USR) }
410-
//{ "usr", toBase64(I.Underlying.Type.USR) }
411410
});
412411
writeSymbolInfo(I);
413412
writeTagLine("qualname", I.Underlying.Type.QualName);

0 commit comments

Comments
 (0)