Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions be/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,8 @@ if (COMPILER_CLANG)
-Wconversion)
add_compile_options( -Wno-gnu-statement-expression
-Wno-implicit-float-conversion
-Wno-implicit-int-conversion
-Wno-sign-conversion
-Wno-shorten-64-to-32)
)
if (USE_LIBCPP)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++>)
add_definitions(-DUSE_LIBCPP)
Expand Down Expand Up @@ -722,6 +721,12 @@ if (MAKE_TEST)
if (ARCH_ARM)
add_compile_options(-ffp-contract=off)
endif()
if (COMPILER_CLANG)
add_compile_options(
-Wno-implicit-int-conversion
-Wno-shorten-64-to-32
)
endif()
endif ()

# use this to avoid some runtime tracker. reuse BE_TEST symbol, no need another.
Expand Down
2 changes: 2 additions & 0 deletions be/src/cloud/cloud_internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "io/cache/block_file_cache_factory.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"
#include "common/compile_check_begin.h"

CloudInternalServiceImpl::CloudInternalServiceImpl(CloudStorageEngine& engine, ExecEnv* exec_env)
Expand Down Expand Up @@ -435,4 +436,5 @@ void CloudInternalServiceImpl::recycle_cache(google::protobuf::RpcController* co
}
}

#include "common/compile_check_avoid_end.h"
} // namespace doris
2 changes: 2 additions & 0 deletions be/src/cloud/cloud_snapshot_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "util/slice.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"
namespace {
bool _end_with(std::string_view str, std::string_view match) {
return str.size() >= match.size() &&
Expand Down Expand Up @@ -241,4 +242,5 @@ Status CloudSnapshotLoader::download(const std::map<std::string, std::string>& s
return status;
}

#include "common/compile_check_avoid_end.h"
} // end namespace doris
2 changes: 2 additions & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "util/cpu_info.h"

namespace doris::config {
#include "common/compile_check_avoid_begin.h"

// Dir of custom config file
DEFINE_String(custom_config_dir, "${DORIS_HOME}/conf");
Expand Down Expand Up @@ -2136,4 +2137,5 @@ std::vector<std::vector<std::string>> get_config_info() {
return configs;
}

#include "common/compile_check_avoid_end.h"
} // namespace doris::config
2 changes: 2 additions & 0 deletions be/src/common/dwarf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
#define DW_RLE_start_length 0x7

namespace doris {
#include "common/compile_check_avoid_begin.h"

Dwarf::Dwarf(const std::shared_ptr<Elf>& elf)
: elf_(elf),
Expand Down Expand Up @@ -2028,6 +2029,7 @@ bool Dwarf::LineNumberVM::findAddress(uintptr_t target, Path& file, uint64_t& li
return false;
}

#include "common/compile_check_avoid_end.h"
} // namespace doris

#endif
2 changes: 2 additions & 0 deletions be/src/common/logconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "common/logging.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"

static bool logging_initialized = false;

Expand Down Expand Up @@ -292,4 +293,5 @@ void update_logging(const std::string& name, const std::string& value) {
}
}

#include "common/compile_check_avoid_end.h"
} // namespace doris
7 changes: 7 additions & 0 deletions be/src/gen_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ add_compile_options(-Wno-return-type)
# each other
add_library(DorisGen STATIC ${SRC_FILES})

if (COMPILER_CLANG)
target_compile_options(DorisGen PRIVATE
-Wno-implicit-int-conversion
-Wno-shorten-64-to-32
)
endif()

# Setting these files as code-generated lets make clean and incremental builds work
# correctly
# set_source_files_properties(${SRC_FILES} PROPERTIES GENERATED TRUE)
Expand Down
2 changes: 2 additions & 0 deletions be/src/geo/geo_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "geo/wkt_parse.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"

constexpr double TOLERANCE = 1e-6;

Expand Down Expand Up @@ -1627,4 +1628,5 @@ std::string GeoShape::as_binary(GeoShape* rhs) {
return res;
}

#include "common/compile_check_avoid_end.h"
} // namespace doris
2 changes: 2 additions & 0 deletions be/src/geo/wkt_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "geo/wkt_lex.l.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"

GeoParseStatus WktParse::parse_wkt(const char* str, size_t len, GeoShape** shape) {
WktParseContext ctx;
Expand All @@ -46,4 +47,5 @@ GeoParseStatus WktParse::parse_wkt(const char* str, size_t len, GeoShape** shape
return ctx.parse_status;
}

#include "common/compile_check_avoid_end.h"
} // namespace doris
7 changes: 7 additions & 0 deletions be/src/index-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ target_link_libraries(index_tool
${DORIS_LINK_LIBS}
)

if (COMPILER_CLANG)
target_compile_options(index_tool PRIVATE
-Wno-implicit-int-conversion
-Wno-shorten-64-to-32
)
endif()

install(DIRECTORY DESTINATION ${OUTPUT_DIR}/lib/)
install(TARGETS index_tool DESTINATION ${OUTPUT_DIR}/lib/)
if (NOT OS_MACOSX)
Expand Down
7 changes: 7 additions & 0 deletions be/src/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ if (${BUILD_FS_BENCHMARK} STREQUAL "ON")
benchmark
)

if (COMPILER_CLANG)
target_compile_options(fs_benchmark_tool PRIVATE
-Wno-implicit-int-conversion
-Wno-shorten-64-to-32
)
endif()

install(DIRECTORY DESTINATION ${OUTPUT_DIR}/lib/)
install(TARGETS fs_benchmark_tool DESTINATION ${OUTPUT_DIR}/lib/)

Expand Down
2 changes: 2 additions & 0 deletions be/src/pipeline/exec/materialization_source_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "vec/core/block.h"

namespace doris::pipeline {
#include "common/compile_check_avoid_begin.h"

Status MaterializationSourceOperatorX::get_block(RuntimeState* state, vectorized::Block* block,
bool* eos) {
Expand Down Expand Up @@ -67,4 +68,5 @@ Status MaterializationSourceOperatorX::get_block(RuntimeState* state, vectorized
return Status::OK();
}

#include "common/compile_check_avoid_end.h"
} // namespace doris::pipeline
8 changes: 8 additions & 0 deletions be/src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ pch_reuse(meta_tool)
# This permits libraries loaded by dlopen to link to the symbols in the program.
set_target_properties(meta_tool PROPERTIES ENABLE_EXPORTS 1)


if (COMPILER_CLANG)
target_compile_options(meta_tool PRIVATE
-Wno-implicit-int-conversion
-Wno-shorten-64-to-32
)
endif()

target_link_libraries(meta_tool
${DORIS_LINK_LIBS}
)
Expand Down
2 changes: 2 additions & 0 deletions be/src/util/cidr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "common/logging.h"

namespace doris {
#include "common/compile_check_avoid_begin.h"

constexpr std::uint8_t kIPv4Bits = 32;
constexpr std::uint8_t kIPv6Bits = 128;
Expand Down Expand Up @@ -93,4 +94,5 @@ bool CIDR::contains(const CIDR& ip) const {
return (_address[bytes] & mask) == (ip._address[bytes] & mask);
}

#include "common/compile_check_avoid_end.h"
} // end namespace doris
1 change: 1 addition & 0 deletions be/src/util/cpu_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
using boost::algorithm::contains;
using boost::algorithm::trim;
namespace fs = std::filesystem;
#include "common/compile_check_avoid_begin.h"
using std::max;

DECLARE_bool(abort_on_config_error);
Expand Down
2 changes: 2 additions & 0 deletions be/src/vec/exec/scan/olap_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "vec/olap/block_reader.h"

namespace doris::vectorized {
#include "common/compile_check_avoid_begin.h"

using ReadSource = TabletReader::ReadSource;

Expand Down Expand Up @@ -843,4 +844,5 @@ void OlapScanner::_collect_profile_before_close() {
// Overhead counter removed; precise instrumentation is reported via engine_prepare above.
}

#include "common/compile_check_avoid_end.h"
} // namespace doris::vectorized
2 changes: 2 additions & 0 deletions be/src/vec/exec/skewed_partition_rebalancer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <list>

namespace doris::vectorized {
#include "common/compile_check_avoid_begin.h"

SkewedPartitionRebalancer::SkewedPartitionRebalancer(
int partition_count, int task_count, int task_bucket_count,
Expand Down Expand Up @@ -276,4 +277,5 @@ void SkewedPartitionRebalancer::_rebalance_partitions(long data_processed) {
task_bucket_max_partitions);
_data_processed_at_last_rebalance = data_processed;
}
#include "common/compile_check_avoid_end.h"
} // namespace doris::vectorized
Loading