File tree 5 files changed +4
-16
lines changed
5 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ struct MRDOX_VISIBLE
35
35
36
36
/* * Kind of declaration.
37
37
*/
38
- InfoKind Kind = InfoKind::Default ;
38
+ InfoKind Kind;
39
39
40
40
/* * The unqualified name.
41
41
*/
@@ -57,7 +57,7 @@ struct MRDOX_VISIBLE
57
57
58
58
explicit
59
59
Info (
60
- InfoKind kind = InfoKind::Default ,
60
+ InfoKind kind,
61
61
SymbolID ID = SymbolID::zero)
62
62
: id(ID)
63
63
, Kind(kind)
@@ -80,7 +80,6 @@ struct MRDOX_VISIBLE
80
80
std::string_view
81
81
symbolType () const noexcept ;
82
82
83
- constexpr bool isDefault () const noexcept { return Kind == InfoKind::Default; }
84
83
constexpr bool isNamespace () const noexcept { return Kind == InfoKind::Namespace; }
85
84
constexpr bool isRecord () const noexcept { return Kind == InfoKind::Record; }
86
85
constexpr bool isFunction () const noexcept { return Kind == InfoKind::Function; }
@@ -106,7 +105,6 @@ struct IsInfo : Info
106
105
*/
107
106
static constexpr InfoKind kind_id = K;
108
107
109
- static constexpr bool isDefault () noexcept { return K== InfoKind::Default; }
110
108
static constexpr bool isNamespace () noexcept { return K == InfoKind::Namespace; }
111
109
static constexpr bool isRecord () noexcept { return K == InfoKind::Record; }
112
110
static constexpr bool isFunction () noexcept { return K == InfoKind::Function; }
Original file line number Diff line number Diff line change @@ -109,7 +109,6 @@ using OptionalSymbolID = Optional<SymbolID>;
109
109
*/
110
110
enum class InfoKind
111
111
{
112
- Default,
113
112
Namespace,
114
113
Record,
115
114
Function,
Original file line number Diff line number Diff line change @@ -163,7 +163,8 @@ decodeRecord(
163
163
InfoKind& Kind,
164
164
llvm::StringRef Blob)
165
165
{
166
- switch (auto kind = static_cast <InfoKind>(R[0 ]))
166
+ Kind = static_cast <InfoKind>(R[0 ]);
167
+ switch (Kind)
167
168
{
168
169
case InfoKind::Namespace:
169
170
case InfoKind::Record:
@@ -173,10 +174,8 @@ decodeRecord(
173
174
case InfoKind::Variable:
174
175
case InfoKind::Field:
175
176
case InfoKind::Specialization:
176
- Kind = kind;
177
177
return Error::success ();
178
178
default :
179
- Kind = InfoKind::Default;
180
179
return Error (" InfoKind is invalid" );
181
180
}
182
181
}
Original file line number Diff line number Diff line change @@ -60,9 +60,6 @@ extractName() const
60
60
case InfoKind::Variable:
61
61
return std::string (" @nonymous_var_" ) +
62
62
llvm::toHex (id);
63
- case InfoKind::Default:
64
- return std::string (" @nonymous_" ) +
65
- llvm::toHex (id);
66
63
default :
67
64
llvm_unreachable (" Invalid InfoKind." );
68
65
return std::string (" " );
@@ -94,8 +91,6 @@ symbolType() const noexcept
94
91
{
95
92
switch (this ->Kind )
96
93
{
97
- case InfoKind::Default:
98
- return " default" ;
99
94
case InfoKind::Namespace:
100
95
return " namespace" ;
101
96
case InfoKind::Record:
Original file line number Diff line number Diff line change @@ -160,9 +160,6 @@ format(
160
160
const char * str = " <unknown InfoKind>" ;
161
161
switch (t)
162
162
{
163
- case clang::mrdox::InfoKind::Default:
164
- str = " default" ;
165
- break ;
166
163
case clang::mrdox::InfoKind::Namespace:
167
164
str = " namespace" ;
168
165
break ;
You can’t perform that action at this time.
0 commit comments