]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/cp-support.c
Use for-each more in gdb
authorTom Tromey <tom@tromey.com>
Fri, 3 Dec 2021 21:45:37 +0000 (14:45 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 8 Dec 2021 20:20:30 +0000 (13:20 -0700)
commit696d6f4d5c1bc9b36d0402c2393efe62e49392d9
treee0a5c7edfce36b065afc1f443a15906936c44660
parent621f8c42d3df079ca5781cdb0925c5ec3498f59c
Use for-each more in gdb

There are some loops in gdb that use ARRAY_SIZE (or a wordier
equivalent) to loop over a static array.  This patch changes some of
these to use foreach instead.

Regression tested on x86-64 Fedora 34.
gdb/ada-lang.c
gdb/bcache.c
gdb/c-exp.y
gdb/cp-support.c
gdb/d-exp.y
gdb/f-exp.y
gdb/go-exp.y
gdb/p-exp.y
gdb/rust-parse.c
gdb/symtab.c