diff --git a/debian/changelog b/debian/changelog index ded8a791..a2fd79ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,15 +47,30 @@ llvm-toolchain-snapshot (1:12~++20200715052739+d6e79e3dd6d-1~exp1) experimental; -- Sylvestre Ledru Wed, 08 Jul 2020 15:19:14 +0200 -llvm-toolchain-11 (1:11.0.0~+rc5-2) UNRELEASED; urgency=medium +llvm-toolchain-11 (1:11.0.0-2) unstable; urgency=medium + + * Fix a clang-format issue. Fix bug #47589 + + -- Sylvestre Ledru Mon, 12 Oct 2020 15:15:27 +0200 + +llvm-toolchain-11 (1:11.0.0-1) unstable; urgency=medium + + * New upstream release + + -- Sylvestre Ledru Mon, 12 Oct 2020 11:14:19 +0200 + +llvm-toolchain-11 (1:11.0.0~+rc6-1) unstable; urgency=medium [ Sylvestre Ledru ] + * New rc release * 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 + * 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 Thu, 01 Oct 2020 15:12:29 +0200 + -- Sylvestre Ledru Wed, 07 Oct 2020 16:38:40 +0200 llvm-toolchain-11 (1:11.0.0~+rc5-1) unstable; urgency=medium @@ -300,11 +315,27 @@ llvm-toolchain-snapshot (1:11~++20200123111717+04fd2041561-1~exp1) experimental; -- Sylvestre Ledru Thu, 23 Jan 2020 14:52:30 +0100 +llvm-toolchain-10 (1:10.0.1-7) UNRELEASED; urgency=medium + + [ Samuel Thibault ] + * debian/patches/hurd/hurd-cxx-paths.diff: Add missing GCC installation + initialization. + + [ Sylvestre Ledru ] + * Replace use of deprecated $ADTTMP with $AUTOPKGTEST_TMP. + + -- Samuel Thibault Thu, 27 Aug 2020 17:06:44 +0200 + llvm-toolchain-10 (1:10.0.1-6) unstable; urgency=medium + [ Sylvestre Ledru ] * Add debian/* to the copyright file. Uses the same license as LLVM + [ Julien Cristau ] + * Cherry-pick "[PowerPC] PPCBoolRetToInt: Don't translate Constant's + operands". Fixes rustc crash building firefox-esr. + -- Sylvestre Ledru Wed, 02 Sep 2020 13:55:46 +0200 llvm-toolchain-10 (1:10.0.1-5) unstable; urgency=medium diff --git a/debian/patches/fix-clang-format-bug-47589.patch b/debian/patches/fix-clang-format-bug-47589.patch new file mode 100644 index 00000000..010c3339 --- /dev/null +++ b/debian/patches/fix-clang-format-bug-47589.patch @@ -0,0 +1,148 @@ +From 05860350084abdae30dfbd2181452d1b87dca3b4 Mon Sep 17 00:00:00 2001 +From: Sylvestre Ledru +Date: Mon, 12 Oct 2020 18:47:30 +0200 +Subject: [PATCH] Revert "[clang-format] Fix AlignConsecutive on PP blocks" + +This reverts commit b2eb439317576ce718193763c12bff9fccdfc166. +--- + clang/lib/Format/FormatToken.h | 6 ----- + clang/lib/Format/UnwrappedLineParser.cpp | 2 -- + clang/lib/Format/WhitespaceManager.cpp | 10 +++----- + clang/unittests/Format/FormatTest.cpp | 23 ------------------- + clang/unittests/Format/FormatTestComments.cpp | 21 ----------------- + 5 files changed, 3 insertions(+), 59 deletions(-) + +diff --git a/clang/lib/Format/FormatToken.h b/clang/lib/Format/FormatToken.h +index d4287f53fde..b132a3e84da 100644 +--- a/clang/lib/Format/FormatToken.h ++++ b/clang/lib/Format/FormatToken.h +@@ -183,12 +183,6 @@ struct FormatToken { + /// before the token. + bool MustBreakBefore = false; + +- /// Whether to not align across this token +- /// +- /// This happens for example when a preprocessor directive ended directly +- /// before the token, but very rarely otherwise. +- bool MustBreakAlignBefore = false; +- + /// The raw text of the token. + /// + /// Contains the raw token text without leading whitespace and without leading +diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp +index a37386425aa..ea8a41cfba8 100644 +--- a/clang/lib/Format/UnwrappedLineParser.cpp ++++ b/clang/lib/Format/UnwrappedLineParser.cpp +@@ -3037,7 +3037,6 @@ void UnwrappedLineParser::readToken(int LevelDifference) { + } + FormatTok = Tokens->getNextToken(); + FormatTok->MustBreakBefore = true; +- FormatTok->MustBreakAlignBefore = true; + } + + if (!PPStack.empty() && (PPStack.back().Kind == PP_Unreachable) && +@@ -3062,7 +3061,6 @@ void UnwrappedLineParser::pushToken(FormatToken *Tok) { + Line->Tokens.push_back(UnwrappedLineNode(Tok)); + if (MustBreakBeforeNextToken) { + Line->Tokens.back().Tok->MustBreakBefore = true; +- Line->Tokens.back().Tok->MustBreakAlignBefore = true; + MustBreakBeforeNextToken = false; + } + } +diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp +index 32e0b685ea0..3a265bd0916 100644 +--- a/clang/lib/Format/WhitespaceManager.cpp ++++ b/clang/lib/Format/WhitespaceManager.cpp +@@ -411,11 +411,9 @@ static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, + if (Changes[i].NewlinesBefore != 0) { + CommasBeforeMatch = 0; + EndOfSequence = i; +- // If there is a blank line, there is a forced-align-break (eg, +- // preprocessor), or if the last line didn't contain any matching token, +- // the sequence ends here. +- if (Changes[i].NewlinesBefore > 1 || +- Changes[i].Tok->MustBreakAlignBefore || !FoundMatchOnLine) ++ // If there is a blank line, or if the last line didn't contain any ++ // matching token, the sequence ends here. ++ if (Changes[i].NewlinesBefore > 1 || !FoundMatchOnLine) + AlignCurrentSequence(); + + FoundMatchOnLine = false; +@@ -726,8 +724,6 @@ void WhitespaceManager::alignTrailingComments() { + if (Changes[i].StartOfBlockComment) + continue; + Newlines += Changes[i].NewlinesBefore; +- if (Changes[i].Tok->MustBreakAlignBefore) +- BreakBeforeNext = true; + if (!Changes[i].IsTrailingComment) + continue; + +diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp +index 17d302f0b65..7e4d1fca509 100644 +--- a/clang/unittests/Format/FormatTest.cpp ++++ b/clang/unittests/Format/FormatTest.cpp +@@ -11968,29 +11968,6 @@ TEST_F(FormatTest, AlignConsecutiveAssignments) { + verifyFormat("int oneTwoThree = 123; // comment\n" + "int oneTwo = 12; // comment", + Alignment); +- +- // Bug 25167 +- verifyFormat("#if A\n" +- "#else\n" +- "int aaaaaaaa = 12;\n" +- "#endif\n" +- "#if B\n" +- "#else\n" +- "int a = 12;\n" +- "#endif\n", +- Alignment); +- verifyFormat("enum foo {\n" +- "#if A\n" +- "#else\n" +- " aaaaaaaa = 12;\n" +- "#endif\n" +- "#if B\n" +- "#else\n" +- " a = 12;\n" +- "#endif\n" +- "};\n", +- Alignment); +- + EXPECT_EQ("int a = 5;\n" + "\n" + "int oneTwoThree = 123;", +diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp +index 47509f29744..d5b9f8e0885 100644 +--- a/clang/unittests/Format/FormatTestComments.cpp ++++ b/clang/unittests/Format/FormatTestComments.cpp +@@ -2780,27 +2780,6 @@ TEST_F(FormatTestComments, AlignTrailingComments) { + " // line 2 about b\n" + " long b;", + getLLVMStyleWithColumns(80))); +- +- // Checks an edge case in preprocessor handling. +- // These comments should *not* be aligned +- EXPECT_EQ( +- "#if FOO\n" +- "#else\n" +- "long a; // Line about a\n" +- "#endif\n" +- "#if BAR\n" +- "#else\n" +- "long b_long_name; // Line about b\n" +- "#endif\n", +- format("#if FOO\n" +- "#else\n" +- "long a; // Line about a\n" // Previous (bad) behavior +- "#endif\n" +- "#if BAR\n" +- "#else\n" +- "long b_long_name; // Line about b\n" +- "#endif\n", +- getLLVMStyleWithColumns(80))); + } + + TEST_F(FormatTestComments, AlignsBlockCommentDecorations) { +-- +2.28.0 + diff --git a/debian/patches/series b/debian/patches/series index a73a720c..4a452efe 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -132,3 +132,4 @@ disable-fuzzer-compiler-rt-x86.diff python3-shebang.patch print-lldb-path.patch libcxx-armhf-ftbfs.diff +fix-clang-format-bug-47589.patch diff --git a/debian/tests/cmake-test b/debian/tests/cmake-test index 3efeca4f..c44681c6 100755 --- a/debian/tests/cmake-test +++ b/debian/tests/cmake-test @@ -5,18 +5,18 @@ set -e LLVM_VERSION=12 # this is taken from libjsoncpp package -# Presence of $ADTTMP implies that someone will handle cleanup for us, so we +# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we # can avoid duplicating the effort (signal handling, etc.) here. -if [ -z "$ADTTMP" ] +if [ -z "$AUTOPKGTEST_TMP" ] then - echo "Required envvar ADTTMP \"$ADTTMP\" is not set" >&2 + echo "Required envvar AUTOPKGTEST_TMP \"$AUTOPKGTEST_TMP\" is not set" >&2 exit 1 fi # the idea was taken from spirv-llvm-translator package -cd "$ADTTMP" +cd "$AUTOPKGTEST_TMP" cat < CMakeLists.txt cmake_minimum_required(VERSION 2.6.2) project(cmake-test) diff --git a/debian/tests/integration-test-suite-test b/debian/tests/integration-test-suite-test index 16840ed9..3f35552a 100755 --- a/debian/tests/integration-test-suite-test +++ b/debian/tests/integration-test-suite-test @@ -5,17 +5,17 @@ set -e LLVM_VERSION=12 # this is taken from libjsoncpp package -# Presence of $ADTTMP implies that someone will handle cleanup for us, so we +# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we # can avoid duplicating the effort (signal handling, etc.) here. -if [ -z "$ADTTMP" ] +if [ -z "$AUTOPKGTEST_TMP" ] then - echo "Required envvar ADTTMP \"$ADTTMP\" is not set" >&2 + echo "Required envvar AUTOPKGTEST_TMP \"$AUTOPKGTEST_TMP\" is not set" >&2 exit 1 fi # Copy the integration repo to the temp dir -cp -Rv integration-test-suite/* "$ADTTMP"/ -cd "$ADTTMP" +cp -Rv integration-test-suite/* "$AUTOPKGTEST_TMP"/ +cd "$AUTOPKGTEST_TMP" mkdir build cd build