Downgrade to clang-4.0 to avoid false-positive warnings from clang

* -Wtautological-compare

    error: self-comparison always evaluates to true [-Werror,-Wtautological-compare]
    for (win_T *wp = ((curtab) == curtab) ? firstwin : (curtab)->tp_firstwin; wp != ((void*)0); wp = wp->w_next) {

* -Wconversion

    error: implicit conversion loses floating-point precision: 'const float_T' (aka 'const double') to 'float' [-Werror,-Wconversion]
          do { const float_T flt_ = (tv->vval.v_float); switch ((sizeof (flt_) == sizeof (float) ? __fpclassifyf (flt_) : sizeof (flt_) == sizeof (double) ? __fpclassify (flt_) : __fpclassifyl (flt_))) { case 0: { ga_concat(gap, (char_u *)(char_u *) "str2float('nan')"); break; } case 1: { if (flt_ < 0) { ga_append(gap, '-'); } ga_concat(gap, (char_u *)(char_u *) "str2float('inf')"); break; } default: { char numbuf[NUMBUFLEN]; vim_snprintf(numbuf, ((sizeof(numbuf)/sizeof((numbuf)[0])) / ((size_t)(!(sizeof(numbuf) % sizeof((numbuf)[0]))))), "%g", flt_); ga_concat(gap, (char_u *)(char_u *) numbuf); } } } while (0);
                                                                                                   ~~~~~~~~~~~~~  ^~~~
This commit is contained in:
James McCoy 2018-11-20 20:22:42 -05:00 committed by Marco Hinz
parent 02d68fbcae
commit 2cbac719c3
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F
2 changed files with 5 additions and 3 deletions

View File

@ -34,6 +34,7 @@ env:
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
- ASAN_SYMBOLIZE=asan_symbolize
# Environment variables for Valgrind.
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
# If this file exists, the cache is valid (compile was successful).
@ -50,11 +51,12 @@ jobs:
include:
- stage: normal builds
os: linux
compiler: clang
compiler: clang-4.0
env: >
CLANG_SANITIZER=ASAN_UBSAN
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
ASAN_SYMBOLIZE=asan_symbolize-4.0
sudo: true
- os: linux
compiler: gcc
@ -100,7 +102,7 @@ addons:
- autoconf
- automake
- build-essential
- clang
- clang-4.0
- cmake
- cscope
- g++-multilib

View File

@ -83,7 +83,7 @@ valgrind_check() {
asan_check() {
if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then
check_logs "${1}" "*san.*" | asan_symbolize
check_logs "${1}" "*san.*" | $ASAN_SYMBOLIZE
fi
}