================
@@ -13476,23 +13458,22 @@ bool Sema::CheckUsingDeclRedeclaration(SourceLocation 
UsingLoc,
   }
 
   NestedNameSpecifier CNNS = Qual.getCanonical();
-  for (LookupResult::iterator I = Prev.begin(), E = Prev.end(); I != E; ++I) {
-    NamedDecl *D = *I;
-
+  for (const NamedDecl *D : Prev) {
     bool DTypename;
     NestedNameSpecifier DQual = std::nullopt;
-    if (UsingDecl *UD = dyn_cast<UsingDecl>(D)) {
+    if (const UsingDecl *UD = dyn_cast<UsingDecl>(D)) {
       DTypename = UD->hasTypename();
       DQual = UD->getQualifier();
-    } else if (UnresolvedUsingValueDecl *UD
-                 = dyn_cast<UnresolvedUsingValueDecl>(D)) {
+    } else if (const UnresolvedUsingValueDecl *UD =
----------------
tbaederr wrote:

```suggestion
    } else if (const auto *UD =
```

https://github.com/llvm/llvm-project/pull/169938
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to