[llvm] 058f17d - [ADT] Move LLVM_DEPRECATED before type after D133502

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 15:57:06 PDT 2022


Author: Fangrui Song
Date: 2022-09-09T15:56:58-07:00
New Revision: 058f17d3afdf77474936b78a3611fe897f9890f8

URL: https://github.com/llvm/llvm-project/commit/058f17d3afdf77474936b78a3611fe897f9890f8
DIFF: https://github.com/llvm/llvm-project/commit/058f17d3afdf77474936b78a3611fe897f9890f8.diff

LOG: [ADT] Move LLVM_DEPRECATED before type after D133502

`[[deprecated(...)]]` cannot appear between `inline size_t`.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/STLArrayExtras.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/STLArrayExtras.h b/llvm/include/llvm/ADT/STLArrayExtras.h
index 25f741e75381..80739ee4378e 100644
--- a/llvm/include/llvm/ADT/STLArrayExtras.h
+++ b/llvm/include/llvm/ADT/STLArrayExtras.h
@@ -28,8 +28,8 @@ namespace llvm {
 
 /// Find the length of an array.
 template <class T, std::size_t N>
-constexpr inline LLVM_DEPRECATED("Use std::size instead.", "std::size") size_t
-    array_lengthof(T (&)[N]) {
+LLVM_DEPRECATED("Use std::size instead.", "std::size")
+constexpr inline size_t array_lengthof(T (&)[N]) {
   return N;
 }
 


        


More information about the llvm-commits mailing list