Author: Kazu Hirata
Date: 2025-06-08T01:34:02-07:00
New Revision: 0613f8b9e49537c7493870ad971fdaf353a2a90d

URL: 
https://github.com/llvm/llvm-project/commit/0613f8b9e49537c7493870ad971fdaf353a2a90d
DIFF: 
https://github.com/llvm/llvm-project/commit/0613f8b9e49537c7493870ad971fdaf353a2a90d.diff

LOG: [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.

Added: 
    

Modified: 
    clang-tools-extra/clang-move/Move.h

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-move/Move.h 
b/clang-tools-extra/clang-move/Move.h
index ea241bbbc4f8a..ba613abc03e19 100644
--- a/clang-tools-extra/clang-move/Move.h
+++ b/clang-tools-extra/clang-move/Move.h
@@ -49,9 +49,7 @@ class DeclarationReporter {
     bool Templated = false;    // Whether the declaration is templated.
   };
 
-  const std::vector<Declaration> getDeclarationList() const {
-    return DeclarationList;
-  }
+  ArrayRef<Declaration> getDeclarationList() const { return DeclarationList; }
 
 private:
   std::vector<Declaration> DeclarationList;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to