Skip to content

Commit

Permalink
fix clang-15 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jinshang committed Sep 21, 2022
1 parent fbd8ff6 commit f1de7e0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
3 changes: 0 additions & 3 deletions cpp/src/arrow/array/array_test.cc
Expand Up @@ -2831,8 +2831,6 @@ class DecimalTest : public ::testing::TestWithParam<int> {
auto type = std::make_shared<TYPE>(precision, 4);
auto builder = std::make_shared<DecimalBuilder>(type);

size_t null_count = 0;

const size_t size = draw.size();

ARROW_EXPECT_OK(builder->Reserve(size));
Expand All @@ -2842,7 +2840,6 @@ class DecimalTest : public ::testing::TestWithParam<int> {
ARROW_EXPECT_OK(builder->Append(draw[i]));
} else {
ARROW_EXPECT_OK(builder->AppendNull());
++null_count;
}
}

Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/filesystem/gcsfs_test.cc
Expand Up @@ -31,6 +31,7 @@
// We need BOOST_USE_WINDOWS_H definition with MinGW when we use
// boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
// cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
#include <boost/process.hpp>
#include <boost/thread.hpp>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/filesystem/s3_test_util.cc
Expand Up @@ -37,6 +37,7 @@
// We need BOOST_USE_WINDOWS_H definition with MinGW when we use
// boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
// cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
#include <boost/process.hpp>

#include "arrow/filesystem/s3_test_util.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/flight/test_util.cc
Expand Up @@ -35,6 +35,7 @@
// boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
// cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
#include <gtest/gtest.h>
#define BOOST_NO_CXX98_FUNCTION_BASE // ARROW-17805
#include <boost/process.hpp>

#include "arrow/array.h"
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/gandiva/engine.cc
Expand Up @@ -234,11 +234,11 @@ Status Engine::LoadPreCompiledIR() {
Status::CodeGenError("Could not load module from IR: ",
buffer_or_error.getError().message()));

std::unique_ptr<llvm::MemoryBuffer> buffer = move(buffer_or_error.get());
std::unique_ptr<llvm::MemoryBuffer> buffer = std::move(buffer_or_error.get());

/// Parse the IR module.
llvm::Expected<std::unique_ptr<llvm::Module>> module_or_error =
llvm::getOwningLazyBitcodeModule(move(buffer), *context());
llvm::getOwningLazyBitcodeModule(std::move(buffer), *context());
if (!module_or_error) {
// NOTE: llvm::handleAllErrors() fails linking with RTTI-disabled LLVM builds
// (ARROW-5148)
Expand All @@ -247,14 +247,14 @@ Status Engine::LoadPreCompiledIR() {
stream << module_or_error.takeError();
return Status::CodeGenError(stream.str());
}
std::unique_ptr<llvm::Module> ir_module = move(module_or_error.get());
std::unique_ptr<llvm::Module> ir_module = std::move(module_or_error.get());

// set dataLayout
SetDataLayout(ir_module.get());

ARROW_RETURN_IF(llvm::verifyModule(*ir_module, &llvm::errs()),
Status::CodeGenError("verify of IR Module failed"));
ARROW_RETURN_IF(llvm::Linker::linkModules(*module_, move(ir_module)),
ARROW_RETURN_IF(llvm::Linker::linkModules(*module_, std::move(ir_module)),
Status::CodeGenError("failed to link IR Modules"));

return Status::OK();
Expand Down

0 comments on commit f1de7e0

Please sign in to comment.