diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp --- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -124,7 +124,6 @@ : tooling::Diagnostic(CheckName, DiagLevel, BuildDirectory), IsWarningAsError(IsWarningAsError) {} - class ClangTidyContext::CachedGlobList { public: CachedGlobList(StringRef Globs) : Globs(Globs) {} @@ -710,9 +709,9 @@ const tooling::DiagnosticMessage &M1 = LHS.Message; const tooling::DiagnosticMessage &M2 = RHS.Message; - return - std::tie(M1.FilePath, M1.FileOffset, LHS.DiagnosticName, M1.Message) < - std::tie(M2.FilePath, M2.FileOffset, RHS.DiagnosticName, 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 { diff --git a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp --- a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp +++ b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp @@ -61,9 +61,7 @@ arg.Edits[0].range == Range && arg.Edits[0].newText == Replacement; } -MATCHER_P(FixMessage, Message, "") { - return arg.Message == Message; -} +MATCHER_P(FixMessage, Message, "") { return arg.Message == Message; } MATCHER_P(EqualToLSPDiag, LSPDiag, "LSP diagnostic " + llvm::to_string(LSPDiag)) { @@ -258,13 +256,13 @@ Diag(Test.range("macroarg"), "multiple unsequenced modifications to 'y'"), AllOf( - Diag(Test.range("main"), - "use a trailing return type for this function"), - DiagSource(Diag::ClangTidy), - DiagName("modernize-use-trailing-return-type"), - // Verify that we don't have "[check-name]" suffix in the message. - WithFix(FixMessage("use a trailing return type for this function"))) - )); + Diag(Test.range("main"), + "use a trailing return type for this function"), + DiagSource(Diag::ClangTidy), + DiagName("modernize-use-trailing-return-type"), + // Verify that we don't have "[check-name]" suffix in the message. + WithFix(FixMessage( + "use a trailing return type for this function"))))); } TEST(DiagnosticTest, ClangTidySuppressionComment) { @@ -836,8 +834,9 @@ auto Index = buildIndexWithSymbol({}); TU.ExternalIndex = Index.get(); - EXPECT_THAT(TU.build().getDiagnostics(), - ElementsAre(Diag(Test.range(), "use of undeclared identifier 'a'"))); + EXPECT_THAT( + TU.build().getDiagnostics(), + ElementsAre(Diag(Test.range(), "use of undeclared identifier 'a'"))); } TEST(DiagsInHeaders, DiagInsideHeader) {