github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp --
clang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp
clang-tools-extra/clangd/index/remote/server/Server.cpp
clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
--diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clangd/index/remote/server/Server.cpp
b/clang-tools-extra/clangd/index/remote/server/Server.cpp
index f36025156..f24e21ef0 100644
--- a/clang-tools-extra/clangd/index/remote/server/Server.cpp
+++ b/clang-tools-extra/clangd/index/remote/server/Server.cpp
@@ -590,7 +590,8 @@ int main(int argc, char *argv[]) {
llvm::sys::SetInterruptFunction(&clang::clangd::requestShutdown);
if (!llvm::sys::path::is_absolute(IndexRoot, llvm::sys::path::Style::posix)
&&
- !llvm::sys::path::is_absolute(IndexRoot,
llvm::sys::path::Style::windows)) {
+ !llvm::sys::path::is_absolute(IndexRoot,
+ llvm::sys::path::Style::windows)) {
llvm::errs() << "Index root should be an absolute path.\n";
return -1;
}
diff --git a/clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
b/clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
index b4f5c7d89..74eb60984 100644
--- a/clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
+++ b/clang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
@@ -466,7 +466,7 @@ TEST(RemoteMarshallingTest, CrossPlatformPathsRoundTrip) {
Location.End.setColumn(4);
// Construct the URI as a Windows machine would have serialized it into the
// index: file:///C:/remote/project/lib/File.cpp.
- Location.FileURI =
+ Location.FileURI =
Strings.save("file:///C:/remote/project/lib/File.cpp").begin();
Ref.Location = Location;
``````````
</details>
https://github.com/llvm/llvm-project/pull/207202
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits