hyperscan
hyperscan copied to clipboard
range-loop-analysis compilation failure when using Xcode command line tools 12.0
When using Xcode command line tools 12.0, some build compilation failure will occur, reporting error like:
~/vcpkg/buildtrees/chimera/src/5.3.0-6c5c4c3edd.clean/util/ng_corpus_generator.cpp:84:22: error: loop variable 'v' is always a copy because the range of type 'decltype(pair_range(adjacent_vertices(v, g)))' (aka 'iterator_range<ue2::ue2_graph<ue2::NGHolder, ue2::NFAGraphVertexProps, ue2::NFAGraphEdgeProps>::adjacency_iterator>') does not return a reference [-Werror,-Wrange-loop-analysis]
59 for (const auto &v : adjacent_vertices_range(g.start, g)) {
......
After some investigation, this issue may be caused by:
- llvm added
-Wrange-loop-analysisto-Wall(https://reviews.llvm.org/D68912) - the latest Xcode command line tools adopted the new version of llvm, which will report the failure