mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Fix 'unqualified call to std::move' errors in clang 15+
This commit is contained in:
@@ -162,7 +162,7 @@ BuiltExpression NFABuilderImpl::getGraph() {
|
||||
throw CompileError("Pattern too large.");
|
||||
}
|
||||
|
||||
return { expr, move(graph) };
|
||||
return { expr, std::move(graph) };
|
||||
}
|
||||
|
||||
void NFABuilderImpl::setNodeReportID(Position pos, int offsetAdjust) {
|
||||
|
@@ -369,7 +369,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
|
||||
pruneUseless(*gc);
|
||||
DEBUG_PRINTF("component %zu has %zu vertices\n", comps.size(),
|
||||
num_vertices(*gc));
|
||||
comps.emplace_back(move(gc));
|
||||
comps.emplace_back(std::move(gc));
|
||||
}
|
||||
|
||||
// Another component to handle the direct shell-to-shell edges.
|
||||
@@ -385,7 +385,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
|
||||
pruneUseless(*gc);
|
||||
DEBUG_PRINTF("shell edge component %zu has %zu vertices\n",
|
||||
comps.size(), num_vertices(*gc));
|
||||
comps.emplace_back(move(gc));
|
||||
comps.emplace_back(std::move(gc));
|
||||
*shell_comp = true;
|
||||
}
|
||||
|
||||
|
@@ -349,7 +349,7 @@ vector<VertexInfoSet> partitionGraph(vector<unique_ptr<VertexInfo>> &infos,
|
||||
unsigned eq_class = classes.size();
|
||||
vi->equivalence_class = eq_class;
|
||||
classes.push_back({vi.get()});
|
||||
classinfomap.emplace(move(ci), eq_class);
|
||||
classinfomap.emplace(std::move(ci), eq_class);
|
||||
} else {
|
||||
// vertex is added to an existing class.
|
||||
unsigned eq_class = ii->second;
|
||||
@@ -441,7 +441,7 @@ void equivalence(vector<VertexInfoSet> &classes, WorkQueue &work_queue,
|
||||
classes[cur_class].erase(vi);
|
||||
new_class_vertices.insert(vi);
|
||||
}
|
||||
classes.emplace_back(move(new_class_vertices));
|
||||
classes.emplace_back(std::move(new_class_vertices));
|
||||
|
||||
if (contains(tmi->first, cur_class)) {
|
||||
reval_queue.push(new_class);
|
||||
|
@@ -254,7 +254,7 @@ void findBestInternal(vector<vector<CharReach>>::const_iterator pb,
|
||||
DEBUG_PRINTF("worse\n");
|
||||
continue;
|
||||
}
|
||||
priority_path.emplace_back(move(as));
|
||||
priority_path.emplace_back(std::move(as));
|
||||
}
|
||||
|
||||
sort(priority_path.begin(), priority_path.end());
|
||||
@@ -422,7 +422,7 @@ void findDoubleBest(vector<vector<CharReach> >::const_iterator pb,
|
||||
DEBUG_PRINTF("worse\n");
|
||||
continue;
|
||||
}
|
||||
priority_path.emplace_back(move(as));
|
||||
priority_path.emplace_back(std::move(as));
|
||||
}
|
||||
|
||||
sort(priority_path.begin(), priority_path.end());
|
||||
@@ -569,7 +569,7 @@ AccelScheme findBestAccelScheme(vector<vector<CharReach>> paths,
|
||||
DAccelScheme da = findBestDoubleAccelScheme(paths, terminating);
|
||||
if (da.double_byte.size() <= DOUBLE_SHUFTI_LIMIT) {
|
||||
rv.double_byte = std::move(da.double_byte);
|
||||
rv.double_cr = move(da.double_cr);
|
||||
rv.double_cr = std::move(da.double_cr);
|
||||
rv.double_offset = da.double_offset;
|
||||
}
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ namespace {
|
||||
|
||||
struct LitGraphVertexProps {
|
||||
LitGraphVertexProps() = default;
|
||||
explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(move(c_in)) {}
|
||||
explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(std::move(c_in)) {}
|
||||
ue2_literal::elem c; // string element (char + bool)
|
||||
size_t index = 0; // managed by ue2_graph
|
||||
};
|
||||
|
@@ -237,7 +237,7 @@ bool handleDecoratedLiterals(RoseBuild &rose, const NGHolder &g,
|
||||
DEBUG_PRINTF("failed validation\n");
|
||||
return false;
|
||||
}
|
||||
masks.emplace_back(move(pm));
|
||||
masks.emplace_back(std::move(pm));
|
||||
}
|
||||
|
||||
for (const auto &pm : masks) {
|
||||
|
@@ -100,7 +100,7 @@ void checkAndAddExitCandidate(const AcyclicGraph &g,
|
||||
|
||||
if (!open.empty()) {
|
||||
DEBUG_PRINTF("exit %zu\n", g[v].index);
|
||||
exits.emplace_back(move(v_exit));
|
||||
exits.emplace_back(std::move(v_exit));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void buildInitialCandidate(const AcyclicGraph &g,
|
||||
|
||||
if (it != ite) {
|
||||
enters.erase(*it);
|
||||
open_jumps = move(enters);
|
||||
open_jumps = std::move(enters);
|
||||
DEBUG_PRINTF("oj size = %zu\n", open_jumps.size());
|
||||
++it;
|
||||
} else {
|
||||
|
@@ -1733,7 +1733,7 @@ void clearProperInEdges(NGHolder &g, const NFAVertex sink) {
|
||||
namespace {
|
||||
struct SomRevNfa {
|
||||
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
|
||||
: sink(s), report(r), nfa(move(n)) {}
|
||||
: sink(s), report(r), nfa(std::move(n)) {}
|
||||
NFAVertex sink;
|
||||
ReportID report;
|
||||
bytecode_ptr<NFA> nfa;
|
||||
@@ -1799,7 +1799,7 @@ bool makeSomRevNfa(vector<SomRevNfa> &som_nfas, const NGHolder &g,
|
||||
return false;
|
||||
}
|
||||
|
||||
som_nfas.emplace_back(sink, report, move(nfa));
|
||||
som_nfas.emplace_back(sink, report, std::move(nfa));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1839,7 +1839,7 @@ bool doSomRevNfa(NG &ng, NGHolder &g, const CompileContext &cc) {
|
||||
assert(som_nfa.nfa);
|
||||
|
||||
// Transfer ownership of the NFA to the SOM slot manager.
|
||||
u32 comp_id = ng.ssm.addRevNfa(move(som_nfa.nfa), maxWidth);
|
||||
u32 comp_id = ng.ssm.addRevNfa(std::move(som_nfa.nfa), maxWidth);
|
||||
|
||||
// Replace this report on 'g' with a SOM_REV_NFA report pointing at our
|
||||
// new component.
|
||||
@@ -1872,7 +1872,7 @@ u32 doSomRevNfaPrefix(NG &ng, const ExpressionInfo &expr, NGHolder &g,
|
||||
max(cc.grey.maxHistoryAvailable, ng.maxSomRevHistoryAvailable));
|
||||
}
|
||||
|
||||
return ng.ssm.addRevNfa(move(nfa), maxWidth);
|
||||
return ng.ssm.addRevNfa(std::move(nfa), maxWidth);
|
||||
}
|
||||
|
||||
static
|
||||
|
@@ -394,7 +394,7 @@ void getSimpleRoseLiterals(const NGHolder &g, bool seeking_anchored,
|
||||
|
||||
lits->reserve(lit_info.size());
|
||||
for (auto &m : lit_info) {
|
||||
lits->emplace_back(move(m.second));
|
||||
lits->emplace_back(std::move(m.second));
|
||||
}
|
||||
DEBUG_PRINTF("%zu candidate literal sets\n", lits->size());
|
||||
}
|
||||
@@ -707,11 +707,11 @@ unique_ptr<VertLitInfo> findBestSplit(const NGHolder &g,
|
||||
auto cmp = LitComparator(g, seeking_anchored, seeking_transient,
|
||||
last_chance);
|
||||
|
||||
unique_ptr<VertLitInfo> best = move(lits.back());
|
||||
unique_ptr<VertLitInfo> best = std::move(lits.back());
|
||||
lits.pop_back();
|
||||
while (!lits.empty()) {
|
||||
if (cmp(best, lits.back())) {
|
||||
best = move(lits.back());
|
||||
best = std::move(lits.back());
|
||||
}
|
||||
lits.pop_back();
|
||||
}
|
||||
@@ -1621,7 +1621,7 @@ void removeRedundantLiteralsFromPrefixes(RoseInGraph &g,
|
||||
if (delay && delay != MO_INVALID_IDX) {
|
||||
DEBUG_PRINTF("setting delay %u on lhs %p\n", delay, h.get());
|
||||
|
||||
g[e].graph = move(h);
|
||||
g[e].graph = std::move(h);
|
||||
g[e].graph_lag = delay;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user