[chore] Add Clang 18/19 Support #47438 (#50300)

pick and modified from #47438

---------

Co-authored-by: Amos Bird <amosbird@gmail.com>
This commit is contained in:
Pxl
2025-04-23 17:51:14 +08:00
committed by GitHub
parent b0c8cb0818
commit e5a9c2552d
8 changed files with 14 additions and 11 deletions

View File

@ -254,6 +254,10 @@ add_compile_options(-g
$<$<COMPILE_LANGUAGE:CXX>:-Wnon-virtual-dtor>)
add_compile_options(-Wno-unused-parameter
$<$<COMPILE_LANGUAGE:CXX>:-Wno-incompatible-pointer-types>
-Wno-unknown-warning-option
-Wno-deprecated-declarations
-Wno-missing-designated-field-initializers
-Wno-sign-compare)
if (COMPILER_GCC)
@ -767,4 +771,3 @@ get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTO
foreach(dir ${dirs})
message(STATUS "dir='${dir}'")
endforeach()

View File

@ -435,7 +435,7 @@ void ExchangeSinkBuffer<Parent>::_construct_request(InstanceLoId id, PUniqueId f
template <typename Parent>
void ExchangeSinkBuffer<Parent>::_ended(InstanceLoId id) {
if (!_instance_to_package_queue_mutex.template contains(id)) {
if (!_instance_to_package_queue_mutex.contains(id)) {
std::stringstream ss;
ss << "failed find the instance id:" << id
<< " now mutex map size:" << _instance_to_package_queue_mutex.size();

View File

@ -66,7 +66,7 @@ struct AtomicWrapper {
AtomicWrapper(const AtomicWrapper& other) : _value(other._value.load()) {}
AtomicWrapper& operator=(const AtomicWrapper& other) { _value.store(other._a.load()); }
AtomicWrapper& operator=(const AtomicWrapper& other) { _value.store(other._value.load()); }
};
// We use BroadcastPBlockHolder to hold a broadcasted PBlock. For broadcast shuffle, one PBlock

View File

@ -317,8 +317,8 @@ Status HashJoinProbeOperatorX::pull(doris::RuntimeState* state, vectorized::Bloc
if constexpr (!std::is_same_v<HashTableProbeType, std::monostate>) {
using HashTableCtxType = std::decay_t<decltype(arg)>;
if constexpr (!std::is_same_v<HashTableCtxType, std::monostate>) {
st = process_hashtable_ctx.template process<need_null_map_for_probe,
ignore_null>(
st = process_hashtable_ctx.template process<
need_null_map_for_probe, ignore_null, HashTableCtxType>(
arg,
need_null_map_for_probe
? &local_state._null_map_column->get_data()

View File

@ -437,7 +437,7 @@ template <typename T>
void ColumnDecimal<T>::sort_column(const ColumnSorter* sorter, EqualFlags& flags,
IColumn::Permutation& perms, EqualRange& range,
bool last_column) const {
sorter->template sort_column(static_cast<const Self&>(*this), flags, perms, range, last_column);
sorter->sort_column(static_cast<const Self&>(*this), flags, perms, range, last_column);
}
template <typename T>

View File

@ -133,7 +133,7 @@ template <typename T>
void ColumnVector<T>::sort_column(const ColumnSorter* sorter, EqualFlags& flags,
IColumn::Permutation& perms, EqualRange& range,
bool last_column) const {
sorter->template sort_column(static_cast<const Self&>(*this), flags, perms, range, last_column);
sorter->sort_column(static_cast<const Self&>(*this), flags, perms, range, last_column);
}
template <typename T>

View File

@ -93,7 +93,7 @@ public:
struct ScanPredicate {
ScanPredicate() = default;
~ScanPredicate() = default;
const std::string column_name;
std::string column_name;
SQLFilterOp op;
std::vector<const CppType*> values;
int scale;

View File

@ -545,7 +545,7 @@ private:
if constexpr (IsDecimalV2<B> || IsDecimalV2<A>) {
// Now, Doris only support decimal +-*/ decimal.
if constexpr (check_overflow) {
auto res = Op::template apply(DecimalV2Value(a), DecimalV2Value(b)).value();
auto res = Op::apply(DecimalV2Value(a), DecimalV2Value(b)).value();
if (res > max_result_number.value || res < -max_result_number.value) {
THROW_DECIMAL_BINARY_OP_OVERFLOW_EXCEPTION(
DecimalV2Value(a).to_string(), Name::name,
@ -554,7 +554,7 @@ private:
}
return res;
} else {
return Op::template apply(DecimalV2Value(a), DecimalV2Value(b)).value();
return Op::apply(DecimalV2Value(a), DecimalV2Value(b)).value();
}
} else {
NativeResultType res;
@ -649,7 +649,7 @@ private:
if constexpr (IsDecimalV2<B> || IsDecimalV2<A>) {
DecimalV2Value l(a);
DecimalV2Value r(b);
auto ans = Op::template apply(l, r, is_null);
auto ans = Op::apply(l, r, is_null);
using ANS_TYPE = std::decay_t<decltype(ans)>;
if constexpr (check_overflow && OpTraits::is_division) {
if constexpr (std::is_same_v<ANS_TYPE, DecimalV2Value>) {