diff options
Diffstat (limited to 'clang-tools-extra/clang-doc/Representation.h')
-rw-r--r-- | clang-tools-extra/clang-doc/Representation.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-doc/Representation.h b/clang-tools-extra/clang-doc/Representation.h index 4be3f42fed2..1772b88e5fa 100644 --- a/clang-tools-extra/clang-doc/Representation.h +++ b/clang-tools-extra/clang-doc/Representation.h @@ -198,10 +198,11 @@ struct MemberTypeInfo : public FieldTypeInfo { std::tie(Other.Type, Other.Name, Other.Access); } - AccessSpecifier Access = AccessSpecifier::AS_none; // Access level associated - // with this info (public, - // protected, private, - // none). + // Access level associated with this info (public, protected, private, none). + // AS_public is set as default because the bitcode writer requires the enum + // with value 0 to be used as the default. + // (AS_public = 0, AS_protected = 1, AS_private = 2, AS_none = 3) + AccessSpecifier Access = AccessSpecifier::AS_public; }; struct Location { @@ -312,7 +313,10 @@ struct FunctionInfo : public SymbolInfo { TypeInfo ReturnType; // Info about the return type of this function. llvm::SmallVector<FieldTypeInfo, 4> Params; // List of parameters. // Access level for this method (public, private, protected, none). - AccessSpecifier Access = AccessSpecifier::AS_none; + // AS_public is set as default because the bitcode writer requires the enum + // with value 0 to be used as the default. + // (AS_public = 0, AS_protected = 1, AS_private = 2, AS_none = 3) + AccessSpecifier Access = AccessSpecifier::AS_public; }; // TODO: Expand to allow for documenting templating, inheritance access, |