Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

range-loop-analysis compilation failure when using Xcode command line tools 12.0 #279

Open
niyue opened this issue Nov 1, 2020 · 0 comments · May be fixed by #280
Open

range-loop-analysis compilation failure when using Xcode command line tools 12.0 #279

niyue opened this issue Nov 1, 2020 · 0 comments · May be fixed by #280

Comments

@niyue
Copy link

niyue commented Nov 1, 2020

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:

  1. llvm added -Wrange-loop-analysis to -Wall (https://reviews.llvm.org/D68912)
  2. the latest Xcode command line tools adopted the new version of llvm, which will report the failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant