We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a18d70 commit 1bdf7f0Copy full SHA for 1bdf7f0
lib/Sema/ConstraintGraph.cpp
@@ -98,14 +98,18 @@ ConstraintGraph::operator[](TypeVariableType *typeVar) {
98
}
99
100
void ConstraintGraphNode::reset() {
101
- ASSERT(TypeVar);
+ if (CONDITIONAL_ASSERT_enabled()) {
102
+ ASSERT(TypeVar);
103
+ ASSERT(Constraints.empty());
104
+ ASSERT(ConstraintIndex.empty());
105
+ ASSERT(ReferencedBy.empty());
106
+ ASSERT(References.empty());
107
+ ASSERT(EquivalenceClass.size() <= 1);
108
+ }
109
+
110
TypeVar = nullptr;
- Bindings.reset();
- Constraints.clear();
- ConstraintIndex.clear();
- ReferencedBy.clear();
- References.clear();
111
EquivalenceClass.clear();
112
+ Bindings.reset();
113
114
115
bool ConstraintGraphNode::forRepresentativeVar() const {
0 commit comments