Fix -Wloop-analysis warnings in llvm-subzero.

These match changes that have been previously landed in LLVM upstream. Bug: chromium:1223264 Change-Id: Ifb104adc7d513b38ad13d96171b290ff204a7de1 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/55128 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarPeter Kasting <pkasting@google.com> Commit-Queue: Peter Kasting <pkasting@google.com>
parent d2bdde2c
......@@ -137,7 +137,7 @@ public:
// If we're adding this to all sub-commands, add it to the ones that have
// already been registered.
if (SC == &*AllSubCommands) {
for (const auto &Sub : RegisteredSubCommands) {
for (auto *Sub : RegisteredSubCommands) {
if (SC == Sub)
continue;
addLiteralOption(Opt, Sub, Name);
......@@ -188,7 +188,7 @@ public:
// If we're adding this to all sub-commands, add it to the ones that have
// already been registered.
if (SC == &*AllSubCommands) {
for (const auto &Sub : RegisteredSubCommands) {
for (auto *Sub : RegisteredSubCommands) {
if (SC == Sub)
continue;
addOption(O, Sub);
......@@ -254,7 +254,7 @@ public:
}
bool hasOptions() const {
for (const auto &S : RegisteredSubCommands) {
for (const auto *S : RegisteredSubCommands) {
if (hasOptions(*S))
return true;
}
......@@ -1738,7 +1738,7 @@ static void sortOpts(StringMap<Option *> &OptMap,
static void
sortSubCommands(const SmallPtrSetImpl<SubCommand *> &SubMap,
SmallVectorImpl<std::pair<const char *, SubCommand *>> &Subs) {
for (const auto &S : SubMap) {
for (auto *S : SubMap) {
if (S->getName().empty())
continue;
Subs.push_back(std::make_pair(S->getName().data(), S));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment