[PATCH] D75959: [clangd] Run clang-format on CodeComplete.cpp and SourceCodeTests.cpp
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 14:13:54 PDT 2020
nridge created this revision.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.
nridge accepted this revision.
nridge added a comment.
This revision is now accepted and ready to land.
I assume I can self-approve this kind of change.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75959
Files:
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
Index: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
===================================================================
--- clang-tools-extra/clangd/unittests/SourceCodeTests.cpp
+++ 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)),
Index: clang-tools-extra/clangd/CodeComplete.cpp
===================================================================
--- clang-tools-extra/clangd/CodeComplete.cpp
+++ clang-tools-extra/clangd/CodeComplete.cpp
@@ -1776,8 +1776,7 @@
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75959.249493.patch
Type: text/x-patch
Size: 2670 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200310/f6f0f9b8/attachment.bin>
More information about the cfe-commits
mailing list