|
14 | 14 | #define MRDOCS_API_METADATA_FUNCTION_HPP
|
15 | 15 |
|
16 | 16 | #include <mrdocs/Platform.hpp>
|
17 |
| -#include <mrdocs/ADT/BitField.hpp> |
18 | 17 | #include <mrdocs/Metadata/Field.hpp>
|
19 | 18 | #include <mrdocs/Metadata/Source.hpp>
|
20 | 19 | #include <mrdocs/Metadata/Symbols.hpp>
|
@@ -68,45 +67,6 @@ enum class FunctionClass
|
68 | 67 |
|
69 | 68 | MRDOCS_DECL dom::String toString(FunctionClass kind) noexcept;
|
70 | 69 |
|
71 |
| -/** Bit constants used with function specifiers. |
72 |
| -*/ |
73 |
| -union FnFlags0 |
74 |
| -{ |
75 |
| - BitFieldFullValue raw; |
76 |
| - |
77 |
| - BitFlag < 0> isVariadic; |
78 |
| - BitFlag < 1> isVirtual; |
79 |
| - BitFlag < 2> isVirtualAsWritten; |
80 |
| - BitFlag < 3> isPure; |
81 |
| - BitFlag < 4> isDefaulted; |
82 |
| - BitFlag < 5> isExplicitlyDefaulted; |
83 |
| - BitFlag < 6> isDeleted; |
84 |
| - BitFlag < 7> isDeletedAsWritten; |
85 |
| - BitFlag < 8> isNoReturn; |
86 |
| - BitFlag < 9> hasOverrideAttr; |
87 |
| - BitFlag <10> hasTrailingReturn; |
88 |
| - BitFlag <11> isConst; |
89 |
| - BitFlag <12> isVolatile; |
90 |
| - BitField<13> isFinal; |
91 |
| - |
92 |
| - BitField<14, 2, ConstexprKind> constexprKind; |
93 |
| - BitField<16, 4, NoexceptKind> exceptionSpec; |
94 |
| - BitField<20, 6, OperatorKind> overloadedOperator; |
95 |
| - BitField<26, 3, StorageClassKind> storageClass; |
96 |
| - BitField<29, 2, ReferenceKind> refQualifier; |
97 |
| -}; |
98 |
| - |
99 |
| -/** Bit field used with function specifiers. |
100 |
| -*/ |
101 |
| -union FnFlags1 |
102 |
| -{ |
103 |
| - BitFieldFullValue raw; |
104 |
| - |
105 |
| - BitFlag<0> isNodiscard; |
106 |
| - |
107 |
| - BitFlag<4> isExplicitObjectMemberFunction; |
108 |
| -}; |
109 |
| - |
110 | 70 | // KRYSTIAN TODO: attributes (nodiscard, deprecated, and carries_dependency)
|
111 | 71 | // KRYSTIAN TODO: flag to indicate whether this is a function parameter pack
|
112 | 72 | /** Represents a single function parameter */
|
@@ -152,15 +112,34 @@ struct FunctionInfo
|
152 | 112 | // the class of function this is
|
153 | 113 | FunctionClass Class = FunctionClass::Normal;
|
154 | 114 |
|
155 |
| - FnFlags0 specs0{.raw{0}}; |
156 |
| - FnFlags1 specs1{.raw{0}}; |
157 |
| - |
158 | 115 | NoexceptInfo Noexcept;
|
159 | 116 |
|
160 | 117 | ExplicitInfo Explicit;
|
161 | 118 |
|
162 | 119 | ExprInfo Requires;
|
163 | 120 |
|
| 121 | + bool IsVariadic = false; |
| 122 | + bool IsVirtual = false; |
| 123 | + bool IsVirtualAsWritten = false; |
| 124 | + bool IsPure = false; |
| 125 | + bool IsDefaulted = false; |
| 126 | + bool IsExplicitlyDefaulted = false; |
| 127 | + bool IsDeleted = false; |
| 128 | + bool IsDeletedAsWritten = false; |
| 129 | + bool IsNoReturn = false; |
| 130 | + bool HasOverrideAttr = false; |
| 131 | + bool HasTrailingReturn = false; |
| 132 | + bool IsConst = false; |
| 133 | + bool IsVolatile = false; |
| 134 | + bool IsFinal = false; |
| 135 | + bool IsNodiscard = false; |
| 136 | + bool IsExplicitObjectMemberFunction = false; |
| 137 | + |
| 138 | + ConstexprKind Constexpr = ConstexprKind::None; |
| 139 | + OperatorKind OverloadedOperator = OperatorKind::None; |
| 140 | + StorageClassKind StorageClass = StorageClassKind::None; |
| 141 | + ReferenceKind RefQualifier = ReferenceKind::None; |
| 142 | + |
164 | 143 | //--------------------------------------------
|
165 | 144 |
|
166 | 145 | explicit FunctionInfo(SymbolID ID) noexcept
|
|
0 commit comments