Merge branch '11' into snapshot

This commit is contained in:
Gianfranco Costamagna 2020-10-01 15:19:11 +02:00
commit b2b30421cf
2 changed files with 26 additions and 13 deletions

16
debian/changelog vendored
View File

@ -40,6 +40,22 @@ llvm-toolchain-snapshot (1:12~++20200715052739+d6e79e3dd6d-1~exp1) experimental;
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 08 Jul 2020 15:19:14 +0200
llvm-toolchain-11 (1:11.0.0~+rc5-2) UNRELEASED; urgency=medium
[ Sylvestre Ledru ]
* remove all artifacts after tests
[ Gianfranco Costamagna ]
* qualify-clang.sh: exclude z3 tests when support is not available, not based on libz3-dev installation but on the error returned by clang invocation
-- Gianfranco Costamagna <locutusofborg@debian.org> Thu, 01 Oct 2020 15:12:29 +0200
llvm-toolchain-11 (1:11.0.0~+rc5-1) unstable; urgency=medium
* New rc release
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 30 Sep 2020 20:15:40 +0200
llvm-toolchain-11 (1:11.0.0~+rc4-1) unstable; urgency=medium
* New rc release

View File

@ -385,9 +385,16 @@ void testBitwiseRules(unsigned int a, int b) {
clang_analyzer_eval((b | -2) >= 0); // expected-warning{{FALSE}}
}
' > foo.c
if dpkg -l|grep -q libz3-dev; then
# Should work
clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 foo.c &> foo.log
if ! grep -q "fatal error: error in backend: LLVM was not compiled with Z3 support, rebuild with -DLLVM_ENABLE_Z3_SOLVER=ON" foo.log; then
# Should work
clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -verify -analyzer-config eagerly-assume=false -analyzer-constraints=z3 foo.c
clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 foo.c &> foo.log
if ! grep -q "2 warnings generated." foo.log; then
echo "Should find 2 warnings"
exit 1
fi
else
echo "z3 support not available"
fi
@ -399,16 +406,6 @@ if grep -q "File a.c Line 7: UNKNOWN" foo.log; then
exit 1
fi
if dpkg -l|grep -q libz3-dev; then
clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection -analyzer-constraints=z3 foo.c &> foo.log
if ! grep -q "2 warnings generated." foo.log; then
echo "Should find 2 warnings"
exit 1
fi
else
echo "z3 support not available"
fi
clang-$VERSION -cc1 -analyze -analyzer-constraints=range -analyzer-checker=core,debug.ExprInspection foo.c &> foo.log
if ! grep -q "warnings generated." foo.log; then
echo "Should find at least 2 warnings"
@ -1341,6 +1338,6 @@ fi
#clean up
rm -f a.out bar crash-* foo foo.* lldb-cmd.txt main.* test_fuzzer.cc foo.* o
rm -rf output matmul.* *profraw opt.ll
rm -rf output matmul.* *profraw opt.ll a.json default.profdata test
echo "Completed"