mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 10:01:04 +01:00
Switch more of toolchain to enumerate/seq (#3137)
These were already used in a few spots, just trying to switch more loops for consistency and ease of reading.
This commit is contained in:
@@ -4,9 +4,6 @@
|
||||
|
||||
#include "toolchain/parser/parse_tree.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <optional>
|
||||
|
||||
#include "common/check.h"
|
||||
#include "common/error.h"
|
||||
#include "llvm/ADT/Sequence.h"
|
||||
@@ -244,7 +241,7 @@ auto ParseTree::Verify() const -> ErrorOr<Success> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < n_impl.kind.child_count(); ++i) {
|
||||
for (int i : llvm::seq(n_impl.kind.child_count())) {
|
||||
if (nodes.empty()) {
|
||||
return Error(llvm::formatv(
|
||||
"Node #{0} is a {1} with child_count {2}, but only had {3} "
|
||||
|
||||
Reference in New Issue
Block a user