diff options
author | serge-sans-paille <sguelton@redhat.com> | 2022-01-26 10:11:12 -0500 |
---|---|---|
committer | serge-sans-paille <sguelton@redhat.com> | 2022-01-26 16:17:45 +0100 |
commit | ef8206320769ad31422a803a0d6de6077fd231d2 (patch) | |
tree | 06ca6445f38939d6a543e0a64c2ede55497a06cd /clang/lib/Sema/DeclSpec.cpp | |
parent | 99ae5c13f64e138d6b17c00bd01c87c3ce58cb6b (diff) | |
download | llvm-ef8206320769ad31422a803a0d6de6077fd231d2.zip llvm-ef8206320769ad31422a803a0d6de6077fd231d2.tar.gz llvm-ef8206320769ad31422a803a0d6de6077fd231d2.tar.bz2 |
Rename llvm::array_lengthof into llvm::size to match std::size from C++17
As a conquence move llvm::array_lengthof from STLExtras.h to
STLForwardCompat.h (which is included by STLExtras.h so no build
breakage expected).
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
-rw-r--r-- | clang/lib/Sema/DeclSpec.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp index d4dc790..c595237 100644 --- a/clang/lib/Sema/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -238,7 +238,7 @@ DeclaratorChunk DeclaratorChunk::getFunction(bool hasProto, // is already used (consider a function returning a function pointer) or too // small (function with too many parameters), go to the heap. if (!TheDeclarator.InlineStorageUsed && - NumParams <= llvm::array_lengthof(TheDeclarator.InlineParams)) { + NumParams <= llvm::size(TheDeclarator.InlineParams)) { I.Fun.Params = TheDeclarator.InlineParams; new (I.Fun.Params) ParamInfo[NumParams]; I.Fun.DeleteParams = false; @@ -308,7 +308,7 @@ void Declarator::setDecompositionBindings( // Allocate storage for bindings and stash them away. if (Bindings.size()) { if (!InlineStorageUsed && - Bindings.size() <= llvm::array_lengthof(InlineBindings)) { + Bindings.size() <= llvm::size(InlineBindings)) { BindingGroup.Bindings = InlineBindings; BindingGroup.DeleteBindings = false; InlineStorageUsed = true; |