aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml76
-rw-r--r--ci/common/test.sh2
-rw-r--r--src/nvim/eval/typval_encode.c.h2
-rw-r--r--src/nvim/msgpack_rpc/helpers.c5
-rw-r--r--src/nvim/regexp_nfa.c25
5 files changed, 57 insertions, 53 deletions
diff --git a/.travis.yml b/.travis.yml
index e6767404ae..94d691b5f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,7 +34,6 @@ 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).
@@ -46,8 +45,8 @@ env:
- CCACHE_COMPRESS=1
- CCACHE_SLOPPINESS=time_macros,file_macro
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
- # Default since 3.3, but Travis (Xenial) has 3.2.4; workaround (#10533).
- - CCACHE_HASHDIR=1
+ # Default since 3.3, but Travis (Xenial) has 3.2.4; required with newer gcc/clang.
+ - CCACHE_CPP2=1
anchors:
envs: &common-job-env
@@ -55,17 +54,44 @@ anchors:
# adds the target branch to the cache key.
FOR_TRAVIS_CACHE=$TRAVIS_BRANCH
+addons:
+ apt:
+ packages: &common-apt-packages
+ - apport
+ - autoconf
+ - automake
+ - build-essential
+ - clang
+ - cmake
+ - cscope
+ - gcc-multilib
+ - gdb
+ - gperf
+ - language-pack-tr
+ - libc6-dev-i386
+ - libtool-bin
+ - locales
+ - ninja-build
+ - pkg-config
+ - unzip
+ - valgrind
+ - xclip
+ homebrew:
+ update: true
+ packages:
+ - ccache
+ - ninja
+
jobs:
include:
- stage: baseline
name: clang-asan
os: linux
- compiler: clang-4.0
+ compiler: clang
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
env:
- CLANG_SANITIZER=ASAN_UBSAN
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- - ASAN_SYMBOLIZE=asan_symbolize-4.0
- *common-job-env
- name: gcc-functionaltest-lua
os: linux
@@ -106,14 +132,22 @@ jobs:
env:
- *common-job-env
- - name: gcc-coverage
+ - name: gcc-coverage (gcc 9)
os: linux
- compiler: gcc
+ compiler: gcc-9
env:
- GCOV=gcov
- CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
- GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
- *common-job-env
+ addons:
+ apt:
+ sources:
+ - sourceline: 'ppa:ubuntu-toolchain-r/test'
+ packages:
+ - *common-apt-packages
+ - gcc-9
+
- name: clang-tsan
os: linux
compiler: clang
@@ -130,34 +164,6 @@ before_script: ci/before_script.sh
script: ci/script.sh
before_cache: ci/before_cache.sh
-addons:
- apt:
- packages:
- - apport
- - autoconf
- - automake
- - build-essential
- - clang-4.0
- - cmake
- - cscope
- - gcc-multilib
- - gdb
- - gperf
- - language-pack-tr
- - libc6-dev-i386
- - libtool-bin
- - locales
- - ninja-build
- - pkg-config
- - unzip
- - valgrind
- - xclip
- homebrew:
- update: true
- packages:
- - ccache
- - ninja
-
branches:
only:
- master
diff --git a/ci/common/test.sh b/ci/common/test.sh
index e25af4d56c..c184064236 100644
--- a/ci/common/test.sh
+++ b/ci/common/test.sh
@@ -81,7 +81,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
}
diff --git a/src/nvim/eval/typval_encode.c.h b/src/nvim/eval/typval_encode.c.h
index 623bdfc93b..289c3ee99c 100644
--- a/src/nvim/eval/typval_encode.c.h
+++ b/src/nvim/eval/typval_encode.c.h
@@ -382,7 +382,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
case VAR_SPECIAL: {
switch (tv->vval.v_special) {
case kSpecialVarNull: {
- TYPVAL_ENCODE_CONV_NIL(tv);
+ TYPVAL_ENCODE_CONV_NIL(tv); // -V1037
break;
}
case kSpecialVarTrue:
diff --git a/src/nvim/msgpack_rpc/helpers.c b/src/nvim/msgpack_rpc/helpers.c
index 3f768dcc0c..18b0bf3c16 100644
--- a/src/nvim/msgpack_rpc/helpers.c
+++ b/src/nvim/msgpack_rpc/helpers.c
@@ -384,10 +384,7 @@ void msgpack_rpc_from_object(const Object result, msgpack_packer *const res)
&& kObjectTypeTabpage == kObjectTypeWindow + 1,
"Buffer, window and tabpage enum items are in order");
switch (cur.aobj->type) {
- case kObjectTypeNil: {
- msgpack_pack_nil(res);
- break;
- }
+ case kObjectTypeNil:
case kObjectTypeLuaRef: {
// TODO(bfredl): could also be an error. Though kObjectTypeLuaRef
// should only appear when the caller has opted in to handle references,
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index a28e05bd7e..a8919560a0 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -1263,8 +1263,8 @@ static int nfa_regatom(void)
IEMSGN("INTERNAL: Unknown character class char: %" PRId64, c);
return FAIL;
}
- /* When '.' is followed by a composing char ignore the dot, so that
- * the composing char is matched here. */
+ // When '.' is followed by a composing char ignore the dot, so that
+ // the composing char is matched here.
if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr())) {
old_regparse = regparse;
c = getchr();
@@ -1279,25 +1279,26 @@ static int nfa_regatom(void)
break;
case Magic('n'):
- if (reg_string)
- /* In a string "\n" matches a newline character. */
+ if (reg_string) {
+ // In a string "\n" matches a newline character.
EMIT(NL);
- else {
- /* In buffer text "\n" matches the end of a line. */
+ } else {
+ // In buffer text "\n" matches the end of a line.
EMIT(NFA_NEWL);
regflags |= RF_HASNL;
}
break;
case Magic('('):
- if (nfa_reg(REG_PAREN) == FAIL)
- return FAIL; /* cascaded error */
+ if (nfa_reg(REG_PAREN) == FAIL) {
+ return FAIL; // cascaded error
+ }
break;
case Magic('|'):
case Magic('&'):
case Magic(')'):
- EMSGN(_(e_misplaced), no_Magic(c));
+ EMSGN(_(e_misplaced), no_Magic(c)); // -V1037
return FAIL;
case Magic('='):
@@ -1306,7 +1307,7 @@ static int nfa_regatom(void)
case Magic('@'):
case Magic('*'):
case Magic('{'):
- /* these should follow an atom, not form an atom */
+ // these should follow an atom, not form an atom
EMSGN(_(e_misplaced), no_Magic(c));
return FAIL;
@@ -1314,8 +1315,8 @@ static int nfa_regatom(void)
{
char_u *lp;
- /* Previous substitute pattern.
- * Generated as "\%(pattern\)". */
+ // Previous substitute pattern.
+ // Generated as "\%(pattern\)".
if (reg_prev_sub == NULL) {
EMSG(_(e_nopresub));
return FAIL;