Re: [clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings
Apologies for not picking this up, I just recently changed my commit email. I can see that it was fixed in the meanwhile. On Sat, 24 Aug 2019 at 01:45, Galina Kistanova via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hello Kristof, > > This commit broke test to few builders: > > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/53703 > > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast > > . . . > Failing Tests (1): > Clang Tools :: clang-tidy/duplicate-reports.cpp > > Please have a look ASAP? > > Thanks > > Galina > > On Fri, Aug 23, 2019 at 7:56 AM Kristof Umann via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: szelethus >> Date: Fri Aug 23 07:57:27 2019 >> New Revision: 369763 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=369763=rev >> Log: >> [clang-tidy] Possibility of displaying duplicate warnings >> >> Summary: In case a checker is registered multiple times as an alias, the >> emitted warnings are uniqued by the report message. However, it is random >> which checker name is included in the warning. When processing the output >> of clang-tidy this behavior caused some problems. In this commit the >> uniquing key contains the checker name too. >> >> Reviewers: alexfh, xazax.hun, Szelethus, aaron.ballman, lebedev.ri, >> JonasToth, gribozavr >> >> Reviewed By: alexfh >> >> Subscribers: dkrupp, whisperity, rnkovacs, mgrang, cfe-commits >> >> Patch by Tibor Brunner! >> >> Tags: #clang >> >> Differential Revision: https://reviews.llvm.org/D65065 >> >> Added: >> clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp >> Modified: >> clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp >> >> Modified: >> clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=369763=369762=369763=diff >> >> == >> --- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp >> (original) >> +++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp >> Fri Aug 23 07:57:27 2019 >> @@ -742,8 +742,9 @@ struct LessClangTidyError { >> const tooling::DiagnosticMessage = LHS.Message; >> const tooling::DiagnosticMessage = RHS.Message; >> >> -return std::tie(M1.FilePath, M1.FileOffset, M1.Message) < >> - std::tie(M2.FilePath, M2.FileOffset, M2.Message); >> +return >> + std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, >> M1.Message) < >> + std::tie(M2.FilePath, M2.FileOffset, RHS.DiagnosticName, >> M2.Message); >>} >> }; >> struct EqualClangTidyError { >> >> Added: clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp?rev=369763=auto >> >> == >> --- clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp (added) >> +++ clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp Fri Aug >> 23 07:57:27 2019 >> @@ -0,0 +1,15 @@ >> +// RUN: %check_clang_tidy %s cert-err09-cpp,cert-err61-cpp %t >> + >> +void alwaysThrows() { >> + int ex = 42; >> + // CHECK-MESSAGES: warning: throw expression should throw anonymous >> temporary values instead [cert-err09-cpp] >> + // CHECK-MESSAGES: warning: throw expression should throw anonymous >> temporary values instead [cert-err61-cpp] >> + throw ex; >> +} >> + >> +void doTheJob() { >> + try { >> +alwaysThrows(); >> + } catch (int&) { >> + } >> +} >> >> >> ___ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings
Hello Kristof, This commit broke test to few builders: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/53703 http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast . . . Failing Tests (1): Clang Tools :: clang-tidy/duplicate-reports.cpp Please have a look ASAP? Thanks Galina On Fri, Aug 23, 2019 at 7:56 AM Kristof Umann via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: szelethus > Date: Fri Aug 23 07:57:27 2019 > New Revision: 369763 > > URL: http://llvm.org/viewvc/llvm-project?rev=369763=rev > Log: > [clang-tidy] Possibility of displaying duplicate warnings > > Summary: In case a checker is registered multiple times as an alias, the > emitted warnings are uniqued by the report message. However, it is random > which checker name is included in the warning. When processing the output > of clang-tidy this behavior caused some problems. In this commit the > uniquing key contains the checker name too. > > Reviewers: alexfh, xazax.hun, Szelethus, aaron.ballman, lebedev.ri, > JonasToth, gribozavr > > Reviewed By: alexfh > > Subscribers: dkrupp, whisperity, rnkovacs, mgrang, cfe-commits > > Patch by Tibor Brunner! > > Tags: #clang > > Differential Revision: https://reviews.llvm.org/D65065 > > Added: > clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp > Modified: > clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp > > Modified: > clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp > URL: > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=369763=369762=369763=diff > > == > --- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp > (original) > +++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Fri > Aug 23 07:57:27 2019 > @@ -742,8 +742,9 @@ struct LessClangTidyError { > const tooling::DiagnosticMessage = LHS.Message; > const tooling::DiagnosticMessage = RHS.Message; > > -return std::tie(M1.FilePath, M1.FileOffset, M1.Message) < > - std::tie(M2.FilePath, M2.FileOffset, M2.Message); > +return > + std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, > M1.Message) < > + std::tie(M2.FilePath, M2.FileOffset, RHS.DiagnosticName, > M2.Message); >} > }; > struct EqualClangTidyError { > > Added: clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp > URL: > http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp?rev=369763=auto > > == > --- clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp (added) > +++ clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp Fri Aug > 23 07:57:27 2019 > @@ -0,0 +1,15 @@ > +// RUN: %check_clang_tidy %s cert-err09-cpp,cert-err61-cpp %t > + > +void alwaysThrows() { > + int ex = 42; > + // CHECK-MESSAGES: warning: throw expression should throw anonymous > temporary values instead [cert-err09-cpp] > + // CHECK-MESSAGES: warning: throw expression should throw anonymous > temporary values instead [cert-err61-cpp] > + throw ex; > +} > + > +void doTheJob() { > + try { > +alwaysThrows(); > + } catch (int&) { > + } > +} > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] r369763 - [clang-tidy] Possibility of displaying duplicate warnings
Author: szelethus Date: Fri Aug 23 07:57:27 2019 New Revision: 369763 URL: http://llvm.org/viewvc/llvm-project?rev=369763=rev Log: [clang-tidy] Possibility of displaying duplicate warnings Summary: In case a checker is registered multiple times as an alias, the emitted warnings are uniqued by the report message. However, it is random which checker name is included in the warning. When processing the output of clang-tidy this behavior caused some problems. In this commit the uniquing key contains the checker name too. Reviewers: alexfh, xazax.hun, Szelethus, aaron.ballman, lebedev.ri, JonasToth, gribozavr Reviewed By: alexfh Subscribers: dkrupp, whisperity, rnkovacs, mgrang, cfe-commits Patch by Tibor Brunner! Tags: #clang Differential Revision: https://reviews.llvm.org/D65065 Added: clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp?rev=369763=369762=369763=diff == --- clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Fri Aug 23 07:57:27 2019 @@ -742,8 +742,9 @@ struct LessClangTidyError { const tooling::DiagnosticMessage = LHS.Message; const tooling::DiagnosticMessage = RHS.Message; -return std::tie(M1.FilePath, M1.FileOffset, M1.Message) < - std::tie(M2.FilePath, M2.FileOffset, M2.Message); +return + std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, M1.Message) < + std::tie(M2.FilePath, M2.FileOffset, RHS.DiagnosticName, M2.Message); } }; struct EqualClangTidyError { Added: clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp?rev=369763=auto == --- clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp (added) +++ clang-tools-extra/trunk/test/clang-tidy/duplicate-reports.cpp Fri Aug 23 07:57:27 2019 @@ -0,0 +1,15 @@ +// RUN: %check_clang_tidy %s cert-err09-cpp,cert-err61-cpp %t + +void alwaysThrows() { + int ex = 42; + // CHECK-MESSAGES: warning: throw expression should throw anonymous temporary values instead [cert-err09-cpp] + // CHECK-MESSAGES: warning: throw expression should throw anonymous temporary values instead [cert-err61-cpp] + throw ex; +} + +void doTheJob() { + try { +alwaysThrows(); + } catch (int&) { + } +} ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits