[Support] ThreadPool tests: silence warning unused variable 'It'
GitOrigin-RevId: 7b75a3a8ebf04b321e07f17aac5bfe9cb7c656d1
diff --git a/unittests/Support/ThreadPool.cpp b/unittests/Support/ThreadPool.cpp
index 30a8924..a560d50 100644
--- a/unittests/Support/ThreadPool.cpp
+++ b/unittests/Support/ThreadPool.cpp
@@ -246,8 +246,10 @@
// Ensure the threads only ran on CPUs 0-3.
// NOTE: Don't use ASSERT* here because this runs in a subprocess,
// and will show up as un-executed in the parent.
- for (auto &It : ThreadsUsed)
- assert(It.getData().front() < 16UL);
+ assert(llvm::all_of(ThreadsUsed,
+ [](auto &T) { return T.getData().front() < 16UL; }) &&
+ "Threads ran on more CPUs than expected! The affinity mask does not "
+ "seem to work.");
return;
}
std::string Executable =