From 0613f8b9e49537c7493870ad971fdaf353a2a90d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 8 Jun 2025 01:34:02 -0700 Subject: [PATCH] [clang-move] Teach getDeclarationList to return ArrayRef (NFC) (#143278) getDeclarationList is used only for read-only access to the array. I don't think it's actually meant to return by value. --- clang-tools-extra/clang-move/Move.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang-tools-extra/clang-move/Move.h b/clang-tools-extra/clang-move/Move.h index ea241bbbc4f8..ba613abc03e1 100644 --- a/clang-tools-extra/clang-move/Move.h +++ b/clang-tools-extra/clang-move/Move.h @@ -49,9 +49,7 @@ public: bool Templated = false; // Whether the declaration is templated. }; - const std::vector getDeclarationList() const { - return DeclarationList; - } + ArrayRef getDeclarationList() const { return DeclarationList; } private: std::vector DeclarationList;