Skip to content

Commit f10bd05

Browse files
ilovepiPeterChou1
authored andcommitted
[clang-doc] Track Descriptions and TypeDeclaration for types (llvm#138058)
Split from llvm#133161. This patch allows Typedefs to now track both their declarations and full descriptions. Subsequent patches will leverage the additional fields in the representation. Co-authored-by: Peter Chou <[email protected]>
1 parent 0ad5296 commit f10bd05

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

clang-tools-extra/clang-doc/Representation.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,13 @@ struct TypedefInfo : public SymbolInfo {
415415

416416
TypeInfo Underlying;
417417

418-
// Inidicates if this is a new C++ "using"-style typedef:
418+
// Underlying type declaration
419+
SmallString<16> TypeDeclaration;
420+
421+
/// Comment description for the typedef.
422+
std::vector<CommentInfo> Description;
423+
424+
// Indicates if this is a new C++ "using"-style typedef:
419425
// using MyVector = std::vector<int>
420426
// False means it's a C-style typedef:
421427
// typedef std::vector<int> MyVector;
@@ -458,7 +464,8 @@ struct EnumValueInfo {
458464
// constant. This will be empty for implicit enumeration values.
459465
SmallString<16> ValueExpr;
460466

461-
std::vector<CommentInfo> Description; /// Comment description of this field.
467+
/// Comment description of this field.
468+
std::vector<CommentInfo> Description;
462469
};
463470

464471
// TODO: Expand to allow for documenting templating.

0 commit comments

Comments
 (0)