aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2022-01-26 16:55:53 +0100
committerBenjamin Kramer <benny.kra@googlemail.com>2022-01-26 16:55:53 +0100
commitf15014ff549a8686671a599f7b49ce9963769eaf (patch)
treec71b273ecd3983fba8bfd6777b534c045b120619 /clang/lib/Sema/DeclSpec.cpp
parent297bbf106288b0d673709ca02917d82e7bebdf1a (diff)
downloadllvm-f15014ff549a8686671a599f7b49ce9963769eaf.zip
llvm-f15014ff549a8686671a599f7b49ce9963769eaf.tar.gz
llvm-f15014ff549a8686671a599f7b49ce9963769eaf.tar.bz2
Revert "Rename llvm::array_lengthof into llvm::size to match std::size from C++17"
This reverts commit ef8206320769ad31422a803a0d6de6077fd231d2. - It conflicts with the existing llvm::size in STLExtras, which will now never be called. - Calling it without llvm:: breaks C++17 compat
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
-rw-r--r--clang/lib/Sema/DeclSpec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index c595237..d4dc790 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::size(TheDeclarator.InlineParams)) {
+ NumParams <= llvm::array_lengthof(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::size(InlineBindings)) {
+ Bindings.size() <= llvm::array_lengthof(InlineBindings)) {
BindingGroup.Bindings = InlineBindings;
BindingGroup.DeleteBindings = false;
InlineStorageUsed = true;