Skip to content
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

populate overloads use explicit types #825

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/mrdocs/Metadata/Info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
#include <mrdocs/Metadata/Javadoc.hpp>
#include <mrdocs/Metadata/Specifiers.hpp>
#include <mrdocs/Metadata/Symbols.hpp>
#include <mrdocs/Metadata/Source.hpp>
#include <mrdocs/Platform.hpp>
#include <mrdocs/Support/Visitor.hpp>


namespace clang::mrdocs {

/* Forward declarations
Expand Down Expand Up @@ -59,8 +61,7 @@ tag_invoke(

/** Base class with common properties of all symbols
*/
struct MRDOCS_VISIBLE
Info
struct MRDOCS_VISIBLE Info : SourceInfo
{
/** The unique identifier for this symbol.
*/
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Concept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace clang::mrdocs {
*/
struct ConceptInfo final
: InfoCommonBase<InfoKind::Concept>
, SourceInfo
{
/** The concepts template parameters
*/
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace clang::mrdocs {

struct EnumInfo final
: InfoCommonBase<InfoKind::Enum>
, SourceInfo
, ScopeInfo
{
// Indicates whether this enum is scoped (e.g. enum class).
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/EnumConstant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace clang::mrdocs {
*/
struct EnumConstantInfo final
: InfoCommonBase<InfoKind::EnumConstant>
, SourceInfo
{
/** The initializer expression, if any
*/
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ namespace clang::mrdocs {
*/
struct FieldInfo final
: InfoCommonBase<InfoKind::Field>
, SourceInfo
{
/** Type of the field */
PolymorphicValue<TypeInfo> Type;
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Friend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace clang::mrdocs {
*/
struct FriendInfo final
: InfoCommonBase<InfoKind::Friend>
, SourceInfo
{
/** Befriended symbol.
*/
Expand Down
24 changes: 10 additions & 14 deletions include/mrdocs/Metadata/Info/Function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ tag_invoke(
// Info for functions.
struct FunctionInfo final
: InfoCommonBase<InfoKind::Function>
, SourceInfo
{
/// Info about the return type of this function.
PolymorphicValue<TypeInfo> ReturnType;
Expand All @@ -141,35 +140,32 @@ struct FunctionInfo final
FunctionClass Class = FunctionClass::Normal;

NoexceptInfo Noexcept;

ExplicitInfo Explicit;

ExprInfo Requires;

bool IsVariadic = false;
bool IsVirtual = false;
bool IsVirtualAsWritten = false;
bool IsPure = false;
bool IsDefaulted = false;
bool IsExplicitlyDefaulted = false;
bool IsDeleted = false;
bool IsDeletedAsWritten = false;
bool IsNoReturn = false;
bool HasOverrideAttr = false;
bool HasTrailingReturn = false;
bool IsConst = false;
bool IsVolatile = false;
bool IsFinal = false;
bool IsNodiscard = false;
bool IsExplicitObjectMemberFunction = false;

ConstexprKind Constexpr = ConstexprKind::None;
OperatorKind OverloadedOperator = OperatorKind::None;
StorageClassKind StorageClass = StorageClassKind::None;
ReferenceKind RefQualifier = ReferenceKind::None;

std::vector<std::string> Attributes;

// CXXMethodDecl
bool IsVirtual = false;
bool IsVirtualAsWritten = false;
bool IsPure = false;
bool IsConst = false;
bool IsVolatile = false;
bool IsFinal = false;
ReferenceKind RefQualifier = ReferenceKind::None;
ExplicitInfo Explicit;

//--------------------------------------------

explicit FunctionInfo(SymbolID const& ID) noexcept
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Guide.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace clang::mrdocs {
*/
struct GuideInfo final
: InfoCommonBase<InfoKind::Guide>
, SourceInfo
{
/** The pattern for the deduced specialization.

Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/NamespaceAlias.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace clang::mrdocs {
*/
struct NamespaceAliasInfo final
: InfoCommonBase<InfoKind::NamespaceAlias>
, SourceInfo
{
/** The aliased symbol. */
PolymorphicValue<NameInfo> AliasedSymbol;
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ tag_invoke(
*/
struct RecordInfo final
: InfoCommonBase<InfoKind::Record>
, SourceInfo
, ScopeInfo
{
/** Kind of record this is (class, struct, or union).
Expand Down
17 changes: 12 additions & 5 deletions include/mrdocs/Metadata/Info/Typedef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ namespace clang::mrdocs {
// Info for typedef and using statements.
struct TypedefInfo final
: InfoCommonBase<InfoKind::Typedef>
, SourceInfo
{
PolymorphicValue<TypeInfo> Type;

// 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;
/** Indicates if this is a new C++ "using"-style typedef

@code
using MyVector = std::vector<int>
@endcode

False means it's a C-style typedef:

@code
typedef std::vector<int> MyVector;
@endcode
*/
bool IsUsing = false;

std::optional<TemplateInfo> Template;
Expand Down
1 change: 0 additions & 1 deletion include/mrdocs/Metadata/Info/Variable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ namespace clang::mrdocs {
*/
struct VariableInfo final
: InfoCommonBase<InfoKind::Variable>
, SourceInfo
{
/** The type of the variable */
PolymorphicValue<TypeInfo> Type;
Expand Down
4 changes: 2 additions & 2 deletions include/mrdocs/Metadata/Source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <mrdocs/Platform.hpp>
#include <mrdocs/ADT/Optional.hpp>
#include <mrdocs/Metadata/Info.hpp>
#include <mrdocs/Dom.hpp>
#include <string>

namespace clang::mrdocs {
Expand Down Expand Up @@ -118,7 +118,7 @@ struct MRDOCS_DECL
*/
OptionalLocation DefLoc;

/** Locations where the entity was declared,
/** Locations where the entity was declared.

This does not include the definition.
*/
Expand Down
3 changes: 1 addition & 2 deletions include/mrdocs/Metadata/Using.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ tag_invoke(
/** Info for using declarations.
*/
struct UsingInfo final
: InfoCommonBase<InfoKind::Using>,
SourceInfo
: InfoCommonBase<InfoKind::Using>
{
/** The kind of using declaration.
*/
Expand Down
Loading