diff --git a/clang-tools-extra/clang-doc/JSONGenerator.cpp b/clang-tools-extra/clang-doc/JSONGenerator.cpp index 77aa8794561e4..0253ebf5335da 100644 --- a/clang-tools-extra/clang-doc/JSONGenerator.cpp +++ b/clang-tools-extra/clang-doc/JSONGenerator.cpp @@ -551,6 +551,7 @@ static void serializeInfo(const RecordInfo &I, json::Object &Obj, auto &MemberObj = *MemberVal.getAsObject(); MemberObj["Name"] = Member.Name; MemberObj["Type"] = Member.Type.Name; + MemberObj["IsStatic"] = Member.IsStatic; if (Member.Access == AccessSpecifier::AS_public) PubMembersArrayRef.push_back(MemberVal); diff --git a/clang-tools-extra/clang-doc/assets/class-template.mustache b/clang-tools-extra/clang-doc/assets/class-template.mustache index 1197e76ab553c..22cd5f06894a4 100644 --- a/clang-tools-extra/clang-doc/assets/class-template.mustache +++ b/clang-tools-extra/clang-doc/assets/class-template.mustache @@ -154,7 +154,7 @@
{{Type}} {{Name}}
+ {{#IsStatic}}static {{/IsStatic}}{{Type}} {{Name}}
{{#MemberComments}}
{{Type}} {{Name}}
+ {{#IsStatic}}static {{/IsStatic}}{{Type}} {{Name}}
{{#MemberComments}}
int public_val
HTML-CALC: const int static_val
+HTML-CALC: static const int static_val
HTML-CALC: