[clang] [clang][NFC] Use range-based for loops (PR #96831)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 19:29:19 PDT 2024
================
@@ -2056,40 +2056,40 @@ void CXXRecordDecl::completeDefinition() {
completeDefinition(nullptr);
}
+static bool hasPureVirtualFinalOverrider(
+ const CXXRecordDecl &RD, const CXXFinalOverriderMap *FinalOverriders) {
+ auto ExistsIn = [](const CXXFinalOverriderMap &FinalOverriders) {
+ for (const auto &[_, M] : FinalOverriders) {
+ for (const auto &[_, SO] : M) {
----------------
MagentaTreehouse wrote:
Updated the code with more descriptive names and removed structured bindings for the outer loop.
Regarding the inner loop, I found that the type of the loop variable cannot be spelled with the public APIs of the class `OverridingMethods` we are iterating through, so I kept that structured binding. But, its readability improved with the updated name. Please let me know if you have further suggestions.
https://github.com/llvm/llvm-project/pull/96831
More information about the cfe-commits
mailing list