commit | 25ee27576396326d60870616777e488c9c49edfc | [log] [tgz] |
---|---|---|
author | David Neto <dneto@google.com> | Thu Oct 29 09:20:45 2020 -0400 |
committer | GitHub <noreply@github.com> | Thu Oct 29 09:20:45 2020 -0400 |
tree | fefd66dca56763e631a8298c8c46a1c0f9cc76e1 | |
parent | 5edb328e81955c62f465a6da050604dcc901519f [diff] |
Avoid copying a ref in a loop (#4000) Avoid triggering a warning from newer Clang, which turns into an error on macOS.
diff --git a/source/cfa.h b/source/cfa.h index 17a4ea5..0d09014 100644 --- a/source/cfa.h +++ b/source/cfa.h
@@ -127,7 +127,7 @@ template <class BB> bool CFA<BB>::FindInWorkList(const std::vector<block_info>& work_list, uint32_t id) { - for (auto& b : work_list) { + for (const auto& b : work_list) { if (b.block->id() == id) return true; } return false;