[AST] Use an explicit copy in a range-based for
The AssociationIteratorTy type will be copied in a range-based for loop.
Make the copy explicit to avoid the -Wrange-loop-analysis warning.
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall.
Differential Revision: https://reviews.llvm.org/D70045
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 0f92d4c..603ae5f 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -1304,7 +1304,7 @@
void StmtPrinter::VisitGenericSelectionExpr(GenericSelectionExpr *Node) {
OS << "_Generic(";
PrintExpr(Node->getControllingExpr());
- for (const GenericSelectionExpr::Association &Assoc : Node->associations()) {
+ for (const GenericSelectionExpr::Association Assoc : Node->associations()) {
OS << ", ";
QualType T = Assoc.getType();
if (T.isNull())