diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -1776,8 +1776,7 @@ Options.IncludeBriefComments = false; IncludeStructure PreambleInclusions; // Unused for signatureHelp semaCodeComplete( - std::make_unique(Options, Index, Result), - Options, + std::make_unique(Options, Index, Result), Options, {FileName, Command, Preamble, Contents, *Offset, std::move(VFS)}); return Result; } diff --git a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp --- a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp +++ b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp @@ -215,8 +215,9 @@ for (unsigned I = 0; I <= L.Length; ++I) EXPECT_THAT_EXPECTED(positionToOffset(File, position(L.Number, I)), llvm::HasValue(L.Offset + I)); - EXPECT_THAT_EXPECTED(positionToOffset(File, position(L.Number, L.Length+1)), - llvm::HasValue(L.Offset + L.Length)); + EXPECT_THAT_EXPECTED( + positionToOffset(File, position(L.Number, L.Length + 1)), + llvm::HasValue(L.Offset + L.Length)); EXPECT_THAT_EXPECTED( positionToOffset(File, position(L.Number, L.Length + 1), false), llvm::Failed()); // out of range @@ -413,7 +414,7 @@ {""}, }, }; - for (const auto& Case : Cases) { + for (const auto &Case : Cases) { EXPECT_EQ(Case.second, visibleNamespaces(Case.first, format::getLLVMStyle())) << Case.first; @@ -450,7 +451,7 @@ EXPECT_THAT(*Result, MacroName("MACRO")); } -TEST(SourceCodeTests, IsInsideMainFile){ +TEST(SourceCodeTests, IsInsideMainFile) { TestTU TU; TU.HeaderCode = R"cpp( #define DEFINE_CLASS(X) class X {}; @@ -471,7 +472,7 @@ TU.ExtraArgs.push_back("-DHeader=Header3"); TU.ExtraArgs.push_back("-DMain=Main3"); auto AST = TU.build(); - const auto& SM = AST.getSourceManager(); + const auto &SM = AST.getSourceManager(); auto DeclLoc = [&AST](llvm::StringRef Name) { return findDecl(AST, Name).getLocation(); }; @@ -574,7 +575,7 @@ TU.AdditionalFiles["foo.inc"] = "int foo;\n"; TU.AdditionalFiles["bar.inc"] = "int bar;\n"; auto AST = TU.build(); - const auto& SM = AST.getSourceManager(); + const auto &SM = AST.getSourceManager(); FileID Foo = SM.getFileID(findDecl(AST, "foo").getLocation()); EXPECT_EQ(SM.getFileOffset(includeHashLoc(Foo, SM)),