Skip to content

Commit 7f77e4a

Browse files
committed
Address implicitInits_ failures from linter
Signed-off-by: Ben Harshbarger <[email protected]>
1 parent 31f987b commit 7f77e4a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

frontend/include/chpl/resolution/resolution-types.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3077,7 +3077,8 @@ class ResolvedFunction {
30773077
returnType_ == other.returnType_ &&
30783078
diagnostics_ == other.diagnostics_ &&
30793079
poiTraceToChild_ == other.poiTraceToChild_ &&
3080-
sigAndInfoToChildPtr_ == other.sigAndInfoToChildPtr_;
3080+
sigAndInfoToChildPtr_ == other.sigAndInfoToChildPtr_ &&
3081+
implicitInits_ == other.implicitInits_;
30813082
}
30823083
bool operator!=(const ResolvedFunction& other) const {
30833084
return !(*this == other);
@@ -3093,6 +3094,7 @@ class ResolvedFunction {
30933094
std::swap(diagnostics_, other.diagnostics_);
30943095
std::swap(poiTraceToChild_, other.poiTraceToChild_);
30953096
std::swap(sigAndInfoToChildPtr_, other.sigAndInfoToChildPtr_);
3097+
std::swap(implicitInits_, other.implicitInits_);
30963098
}
30973099
static bool update(owned<ResolvedFunction>& keep,
30983100
owned<ResolvedFunction>& addin) {
@@ -3113,10 +3115,19 @@ class ResolvedFunction {
31133115
chpl::mark<decltype(p.first)>{}(context, p.first);
31143116
context->markPointer(p.second);
31153117
}
3118+
for (auto& p : implicitInits_) {
3119+
p.first.mark(context);
3120+
for (auto& key : p.second) {
3121+
context->markPointer(key.first);
3122+
key.second.mark(context);
3123+
}
3124+
}
31163125
}
31173126
size_t hash() const {
31183127
// Skip 'resolutionById_' since it can be quite large.
31193128
std::ignore = resolutionById_;
3129+
// Skip 'implicitInits_' as it does not add any relevant information
3130+
std::ignore = implicitInits_;
31203131
size_t ret = chpl::hash(signature_, returnIntent_, poiInfo_, linkageName_, returnType_, diagnostics_);
31213132
for (auto& p : poiTraceToChild_) {
31223133
ret = hash_combine(ret, chpl::hash(p.first));

0 commit comments

Comments
 (0)