intel / intel/hyperscan

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

Open
#279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.5k
Forks
816
Avg merge
4d 21h
Merged PRs (30d)
2

Description

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::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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.