Fix 'unqualified call to std::move' errors in clang 15+

This commit is contained in:
Konstantinos Margaritis
2023-10-03 20:24:39 +03:00
parent 4918f81ea3
commit 0d2f9ccbaa
37 changed files with 224 additions and 224 deletions

View File

@@ -130,14 +130,14 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
} else {
path pp = append(p, CharReach(), p.dest);
all[p.dest].emplace_back(pp);
out.emplace_back(move(pp));
out.emplace_back(std::move(pp));
}
}
if (!s.reports_eod.empty()) {
path pp = append(p, CharReach(), p.dest);
all[p.dest].emplace_back(pp);
out.emplace_back(move(pp));
out.emplace_back(std::move(pp));
}
flat_map<u32, CharReach> dest;
@@ -157,7 +157,7 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
DEBUG_PRINTF("----good: [%s] -> %u\n",
describeClasses(pp.reach).c_str(), pp.dest);
all[e.first].emplace_back(pp);
out.emplace_back(move(pp));
out.emplace_back(std::move(pp));
}
}
@@ -174,7 +174,7 @@ vector<vector<CharReach>> generate_paths(const raw_dfa &rdfa,
extend(rdfa, rev_map, p, all, next_gen);
}
paths = move(next_gen);
paths = std::move(next_gen);
}
dump_paths(paths);

View File

@@ -1299,7 +1299,7 @@ unique_ptr<raw_report_info> gough_build_strat::gatherReports(
*arbReport = MO_INVALID_IDX;
assert(!ri->rl.empty()); /* all components should be able to generate
reports */
return move(ri);
return std::move(ri);
}
u32 raw_gough_report_info_impl::getReportListSize() const {

View File

@@ -1026,7 +1026,7 @@ u32 addReports(const flat_set<ReportID> &r, vector<ReportID> &reports,
u32 offset = verify_u32(reports.size());
insert(&reports, reports.end(), my_reports);
reports_cache.emplace(move(my_reports), offset);
reports_cache.emplace(std::move(my_reports), offset);
return offset;
}
@@ -1064,7 +1064,7 @@ void buildAcceptsList(const build_info &args, ReportListCache &reports_cache,
a.reports = addReports(h[v].reports, reports, reports_cache);
}
a.squash = addSquashMask(args, v, squash);
accepts.emplace_back(move(a));
accepts.emplace_back(std::move(a));
}
}
@@ -1819,7 +1819,7 @@ struct Factory {
*streamState += streamStateLen;
*scratchStateSize += sizeof(RepeatControl);
out.emplace_back(move(info));
out.emplace_back(std::move(info));
}
}

View File

@@ -462,7 +462,7 @@ unique_ptr<raw_report_info> mcclellan_build_strat::gatherReports(
*isSingleReport = 0;
}
return move(ri);
return std::move(ri);
}
u32 raw_report_info_impl::getReportListSize() const {

View File

@@ -319,7 +319,7 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
queue<unique_ptr<raw_dfa>> q;
for (auto &dfa : dfas) {
q.push(move(dfa));
q.push(std::move(dfa));
}
// All DFAs are now on the queue, so we'll clear the vector and use it for
@@ -328,30 +328,30 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
while (q.size() > 1) {
// Attempt to merge the two front elements of the queue.
unique_ptr<raw_dfa> d1 = move(q.front());
unique_ptr<raw_dfa> d1 = std::move(q.front());
q.pop();
unique_ptr<raw_dfa> d2 = move(q.front());
unique_ptr<raw_dfa> d2 = std::move(q.front());
q.pop();
auto rdfa = mergeTwoDfas(d1.get(), d2.get(), max_states, rm, grey);
if (rdfa) {
q.push(move(rdfa));
q.push(std::move(rdfa));
} else {
DEBUG_PRINTF("failed to merge\n");
// Put the larger of the two DFAs on the output list, retain the
// smaller one on the queue for further merge attempts.
if (d2->states.size() > d1->states.size()) {
dfas.emplace_back(move(d2));
q.push(move(d1));
dfas.emplace_back(std::move(d2));
q.push(std::move(d1));
} else {
dfas.emplace_back(move(d1));
q.push(move(d2));
dfas.emplace_back(std::move(d1));
q.push(std::move(d2));
}
}
}
while (!q.empty()) {
dfas.emplace_back(move(q.front()));
dfas.emplace_back(std::move(q.front()));
q.pop();
}

View File

@@ -270,7 +270,7 @@ unique_ptr<raw_report_info> sheng_build_strat::gatherReports(
*isSingleReport = 0;
}
return move(ri);
return std::move(ri);
}
u32 sheng_build_strat::max_allowed_offset_accel() const {