From cd0e9383fc346a8a4ac2d30acf069f4f03fe83d9 Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Tue, 23 May 2023 08:52:53 +0200 Subject: [PATCH] [mlir] Apply ClangTidy performance finding (NFC) --- mlir/lib/CAPI/Interfaces/Interfaces.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/CAPI/Interfaces/Interfaces.cpp b/mlir/lib/CAPI/Interfaces/Interfaces.cpp index e597a7bcb4f2..3144a338fa42 100644 --- a/mlir/lib/CAPI/Interfaces/Interfaces.cpp +++ b/mlir/lib/CAPI/Interfaces/Interfaces.cpp @@ -152,7 +152,7 @@ MlirLogicalResult mlirInferShapedTypeOpInterfaceInferReturnTypes( bool hasRank; intptr_t rank; const int64_t *shapeData; - for (ShapedTypeComponents t : inferredTypeComponents) { + for (const ShapedTypeComponents &t : inferredTypeComponents) { if (t.hasRank()) { hasRank = true; rank = t.getDims().size();