More warnings for clang, exper. constexpr interpreter for clang

This commit is contained in:
Mike Kot 2021-10-02 23:50:47 +02:00
parent 1a200f770c
commit 605268811b
2 changed files with 10 additions and 0 deletions

View File

@ -328,6 +328,12 @@ if (COMPILER_GCC OR COMPILER_CLANG)
set(COMPILER_FLAGS "${COMPILER_FLAGS} -falign-functions=32")
endif ()
if (COMPILER_CLANG)
# A better alternative to interpreter that evaluates constexpr expressions.
# ClickHouse is heavily templated so this may speed up compilation substantially.
set(COMPILER_FLAGS "${COMPILER_FLAGS} -fexperimental-new-constant-interpreter")
endif ()
# Compiler-specific coverage flags e.g. -fcoverage-mapping for gcc
option(WITH_COVERAGE "Profile the resulting binary/binaries" OFF)

View File

@ -53,6 +53,10 @@ if (COMPILER_CLANG)
add_warning(unused-exception-parameter)
add_warning(unused-macros)
add_warning(unused-member-function)
add_warning(dangling-gsl)
add_warning(implicit-int-float-conversion)
add_warning(no-delete-null-pointer-checks)
# XXX: libstdc++ has some of these for 3way compare
if (USE_LIBCXX)
add_warning(zero-as-null-pointer-constant)