Skip to content

Commit 71dbe2b

Browse files
authored
NFC: silence some -Wrange-loop-analysis warnings. (#32634)
1 parent 4a50e23 commit 71dbe2b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/AST/ASTDumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3524,7 +3524,7 @@ namespace {
35243524
if (T->getParent())
35253525
printRec("parent", T->getParent());
35263526

3527-
for (const auto arg : T->getDirectGenericArgs())
3527+
for (const auto &arg : T->getDirectGenericArgs())
35283528
printRec(arg);
35293529
PrintWithColorRAII(OS, ParenthesisColor) << ')';
35303530
}

lib/AST/TypeWalker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Traversal : public TypeVisitor<Traversal, bool>
3939
if (auto parent = ty->getParent())
4040
if (doIt(parent)) return true;
4141

42-
for (const auto arg : ty->getDirectGenericArgs())
42+
for (const auto &arg : ty->getDirectGenericArgs())
4343
if (doIt(arg))
4444
return true;
4545

0 commit comments

Comments
 (0)