Skip to content

Commit 1b80f11

Browse files
committed
chore: separate ASTVisitor from SemaConsumer
1 parent 81a5b88 commit 1b80f11

File tree

7 files changed

+1603
-1816
lines changed

7 files changed

+1603
-1816
lines changed

include/mrdox/Metadata/Function.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ struct FunctionInfo
137137
: IsInfo<InfoKind::Function>
138138
, SourceInfo
139139
{
140-
friend class ASTVisitor;
141-
142140
std::unique_ptr<TypeInfo> ReturnType; // Info about the return type of this function.
143141
std::vector<Param> Params; // List of parameters.
144142

@@ -159,14 +157,6 @@ struct FunctionInfo
159157
: IsInfo(ID)
160158
{
161159
}
162-
163-
private:
164-
explicit
165-
FunctionInfo(
166-
std::unique_ptr<TemplateInfo>&& T)
167-
: Template(std::move(T))
168-
{
169-
}
170160
};
171161

172162
//------------------------------------------------

include/mrdox/Metadata/Record.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ struct RecordInfo
7777
: IsInfo<InfoKind::Record>
7878
, SourceInfo
7979
{
80-
friend class ASTVisitor;
81-
8280
/** Kind of record this is (class, struct, or union).
8381
*/
8482
RecordKeyKind KeyKind = RecordKeyKind::Struct;
@@ -119,14 +117,6 @@ struct RecordInfo
119117
: IsInfo(ID)
120118
{
121119
}
122-
123-
private:
124-
explicit
125-
RecordInfo(
126-
std::unique_ptr<TemplateInfo>&& T)
127-
: Template(std::move(T))
128-
{
129-
}
130120
};
131121

132122
} // mrdox

include/mrdox/Metadata/Typedef.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ struct TypedefInfo
2727
: IsInfo<InfoKind::Typedef>
2828
, SourceInfo
2929
{
30-
friend class ASTVisitor;
31-
3230
std::unique_ptr<TypeInfo> Type;
3331

3432
// Indicates if this is a new C++ "using"-style typedef:
@@ -47,16 +45,6 @@ struct TypedefInfo
4745
: IsInfo(ID)
4846
{
4947
}
50-
51-
private:
52-
// KRYSTIAN NOTE: if Template is non-null,
53-
// then IsUsing *must* be set; should we do it here?
54-
explicit
55-
TypedefInfo(
56-
std::unique_ptr<TemplateInfo>&& T)
57-
: Template(std::move(T))
58-
{
59-
}
6048
};
6149

6250
} // mrdox

include/mrdox/Metadata/Variable.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ struct VariableInfo
4141
: IsInfo<InfoKind::Variable>
4242
, SourceInfo
4343
{
44-
friend class ASTVisitor;
45-
4644
/** The type of the variable */
4745
std::unique_ptr<TypeInfo> Type;
4846

@@ -58,15 +56,6 @@ struct VariableInfo
5856
: IsInfo(ID)
5957
{
6058
}
61-
62-
private:
63-
explicit
64-
VariableInfo(
65-
std::unique_ptr<TemplateInfo>&& T) noexcept
66-
: Template(std::move(T))
67-
{
68-
69-
}
7059
};
7160

7261
} // mrdox

0 commit comments

Comments
 (0)