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 468a23c commit 46ad660Copy full SHA for 46ad660
lib/Driver/SourceComparator.cpp
@@ -77,10 +77,13 @@ SourceComparator::buildEquivalenceClasses() {
77
78
SourceComparator::PRLink *SourceComparator::newPRLink(LineIndices lines,
79
PRLink *next) {
80
+ if (nextLink >= linkVec.size())
81
+ linkVec.emplace_back();
82
assert(nextLink < linkVec.size());
- linkVec[nextLink].lines = lines;
- linkVec[nextLink].next = next;
83
- return &linkVec[nextLink++];
+ PRLink &link = linkVec[nextLink++];
84
+ link.lines = lines;
85
+ link.next = next;
86
+ return &link;
87
}
88
89
std::pair<std::vector<SourceComparator::PRLink *>,
0 commit comments