ICU-21747 Upgrade WarningsAsErrors build bot to Clang-13 on Ubuntu 20.04

This commit is contained in:
Jeff Genovy 2021-09-01 14:01:00 -07:00
parent bbd72fb93e
commit 08dbf093ce
3 changed files with 13 additions and 9 deletions

View file

@ -45,21 +45,28 @@ jobs:
cd icu4c/source/test/cintltst && LANG=C.UTF-8 LD_LIBRARY_PATH=../../lib:../../tools/ctestfw ./cintltst /tsutil/cloctst/TestCDefaultLocale
displayName: 'Test C.UTF-8 Default locale'
#-------------------------------------------------------------------------
- job: ICU4C_Clang_Ubuntu_1804_WarningsAsErrors
displayName: 'C: Linux Clang WarningsAsErrors (Ubuntu 18.04)'
- job: ICU4C_Clang13_Ubuntu_2004_WarningsAsErrors
displayName: 'C: Linux Clang-13 WarningsAsErrors (Ubuntu 20.04)'
timeoutInMinutes: 30
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
steps:
- checkout: self
lfs: true
fetchDepth: 10
# Install Clang-13 from https://apt.llvm.org/
- script: |
curl -Ls https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
sudo apt update
sudo apt install -qy clang-13 lld-13 libc++-13-dev libc++abi-13-dev
displayName: 'Install Clang-13'
- script: |
export CPPFLAGS="-Werror -Wall -Wextra -Wextra-semi -Wundef -Wnon-virtual-dtor" && cd icu4c/source && ./runConfigureICU Linux && make -j2 tests
displayName: 'Build only (WarningsAsErrors)'
env:
CC: clang
CXX: clang++
CC: clang-13
CXX: clang++-13
#-------------------------------------------------------------------------
- job: ICU4C_Clang_Ubuntu_DataFilter_1804
displayName: 'C: Linux Clang DataFilter (Ubuntu 18.04)'

View file

@ -4014,6 +4014,7 @@ void RBBITest::RunMonkey(BreakIterator *bi, RBBIMonkeyKind &mk, const char *name
errln("breakPos > testText.length()");
}
expectedBreaks[breakPos] = 1;
expectedCount++;
U_ASSERT(expectedCount<testText.length());
}

View file

@ -924,8 +924,6 @@ bin_write_xml(BinaryResource *res, const char* id, const char* /*language*/, UEr
static void
table_write_xml(TableResource *res, const char* id, const char* language, UBool isTopLevel, UErrorCode *status) {
uint32_t i = 0;
struct SResource *current = NULL;
char* sid = NULL;
@ -940,7 +938,6 @@ table_write_xml(TableResource *res, const char* id, const char* language, UBool
}
current = res->fFirst;
i = 0;
while (current != NULL) {
res_write_xml(current, sid, language, FALSE, status);
@ -949,7 +946,6 @@ table_write_xml(TableResource *res, const char* id, const char* language, UBool
return;
}
i += 1;
current = current->fNext;
}