summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-doc/YAMLGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-doc/YAMLGenerator.cpp')
-rw-r--r--clang-tools-extra/clang-doc/YAMLGenerator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-doc/YAMLGenerator.cpp b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
index 2449ee057d0..45649622665 100644
--- a/clang-tools-extra/clang-doc/YAMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/YAMLGenerator.cpp
@@ -174,6 +174,9 @@ template <> struct MappingTraits<FieldTypeInfo> {
template <> struct MappingTraits<MemberTypeInfo> {
static void mapping(IO &IO, MemberTypeInfo &I) {
FieldTypeInfoMapping(IO, I);
+ // clang::AccessSpecifier::AS_none is used as the default here because it's
+ // the AS that shouldn't be part of the output. Even though AS_public is the
+ // default in the struct, it should be displayed in the YAML output.
IO.mapOptional("Access", I.Access, clang::AccessSpecifier::AS_none);
}
};
@@ -218,6 +221,9 @@ template <> struct MappingTraits<FunctionInfo> {
IO.mapOptional("Parent", I.Parent, Reference());
IO.mapOptional("Params", I.Params);
IO.mapOptional("ReturnType", I.ReturnType);
+ // clang::AccessSpecifier::AS_none is used as the default here because it's
+ // the AS that shouldn't be part of the output. Even though AS_public is the
+ // default in the struct, it should be displayed in the YAML output.
IO.mapOptional("Access", I.Access, clang::AccessSpecifier::AS_none);
}
};
OpenPOWER on IntegriCloud