[clang-tools-extra] 484402a - [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 13:45:33 PDT 2020
Author: Nathan Ridge
Date: 2020-03-10T16:45:14-04:00
New Revision: 484402abaca2b2523487b564c7d5173404b448af
URL: https://github.com/llvm/llvm-project/commit/484402abaca2b2523487b564c7d5173404b448af
DIFF: https://github.com/llvm/llvm-project/commit/484402abaca2b2523487b564c7d5173404b448af.diff
LOG: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75959
Added:
Modified:
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp
index b2e97729ee6d..b38b33fa4930 100644
--- a/clang-tools-extra/clangd/CodeComplete.cpp
+++ b/clang-tools-extra/clangd/CodeComplete.cpp
@@ -1776,8 +1776,7 @@ SignatureHelp signatureHelp(PathRef FileName,
Options.IncludeBriefComments = false;
IncludeStructure PreambleInclusions; // Unused for signatureHelp
semaCodeComplete(
- std::make_unique<SignatureHelpCollector>(Options, Index, Result),
- Options,
+ std::make_unique<SignatureHelpCollector>(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
index 49f6a73cec48..59c4dd60add2 100644
--- a/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
@@ -215,8 +215,9 @@ TEST(SourceCodeTests, PositionToOffset) {
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 @@ TEST(SourceCodeTests, VisibleNamespaces) {
{""},
},
};
- 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 @@ TEST(SourceCodeTests, WorksAtBeginOfFile) {
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 @@ TEST(SourceCodeTests, IsInsideMainFile){
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 @@ TEST(SourceCodeTests, IncludeHashLoc) {
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)),
More information about the cfe-commits
mailing list