-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[clang-doc] Track Descriptions and TypeDeclaration for types #138058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesSplit from #133161. This patch allows Typedefs to now track both their Co-authored-by: Peter Chou <[email protected]> Full diff: https://github.com/llvm/llvm-project/pull/138058.diff 1 Files Affected:
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.
|
note this whole stack lacks testing. I'll need to do that, or get help on that front, given that GSOC starts soon. |
8e70c84
to
de5258a
Compare
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 <[email protected]>
de5258a
to
fe5424d
Compare
…8058) 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]>
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 [email protected]