Author: Paul Kirth
Date: 2025-05-06T20:16:17-07:00
New Revision: 796652dfc198c228b0d917be05ae69073e6c540c

URL: 
https://github.com/llvm/llvm-project/commit/796652dfc198c228b0d917be05ae69073e6c540c
DIFF: 
https://github.com/llvm/llvm-project/commit/796652dfc198c228b0d917be05ae69073e6c540c.diff

LOG: [clang-doc] Track Descriptions and TypeDeclaration for types (#138058)

Split from #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 <peter.c...@mail.utoronto.ca>

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-doc/Representation.h 
b/clang-tools-extra/clang-doc/Representation.h
index b0b34fc6f08dd..1d5c4dcaeaf37 100644
--- a/clang-tools-extra/clang-doc/Representation.h
+++ b/clang-tools-extra/clang-doc/Representation.h
@@ -415,7 +415,13 @@ struct TypedefInfo : public SymbolInfo {
 
   TypeInfo Underlying;
 
-  // Inidicates if this is a new C++ "using"-style typedef:
+  // Underlying type declaration
+  SmallString<16> TypeDeclaration;
+
+  /// Comment description for the typedef.
+  std::vector<CommentInfo> Description;
+
+  // Indicates if this is a new C++ "using"-style typedef:
   //   using MyVector = std::vector<int>
   // False means it's a C-style typedef:
   //   typedef std::vector<int> MyVector;
@@ -458,7 +464,8 @@ struct EnumValueInfo {
   // constant. This will be empty for implicit enumeration values.
   SmallString<16> ValueExpr;
 
-  std::vector<CommentInfo> Description; /// Comment description of this field.
+  /// Comment description of this field.
+  std::vector<CommentInfo> Description;
 };
 
 // TODO: Expand to allow for documenting templating.


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to