[Lldb-commits] [lldb] (lldb) (minor) Correctly fix a usage of `PATH_MAX` (PR #104502)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 15 15:22:50 PDT 2024
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 c19326cb84e871e1dd77408c2911c7d1651ba34b 3813cf592c64f5ed3202fb76032c7f2d1ac91b83 --extensions cpp -- lldb/source/Utility/RealpathPrefixes.cpp lldb/unittests/Utility/FileSpecListTest.cpp lldb/unittests/Utility/RealpathPrefixesTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/unittests/Utility/FileSpecListTest.cpp b/lldb/unittests/Utility/FileSpecListTest.cpp
index d184453659..b13d8fc2aa 100644
--- a/lldb/unittests/Utility/FileSpecListTest.cpp
+++ b/lldb/unittests/Utility/FileSpecListTest.cpp
@@ -233,7 +233,7 @@ TEST(SupportFileListTest, DirectoryMatchStringPrefixButNotWholeDirectoryName) {
// Prepare RealpathPrefixes
FileSpecList file_spec_list;
file_spec_list.Append(PosixSpec("symlink")); // This is a string prefix of the
- // symlink but not a path prefix.
+ // symlink but not a path prefix.
RealpathPrefixes prefixes(file_spec_list, fs);
// Prepare support file list
diff --git a/lldb/unittests/Utility/RealpathPrefixesTest.cpp b/lldb/unittests/Utility/RealpathPrefixesTest.cpp
index 5238706759..731ee7811d 100644
--- a/lldb/unittests/Utility/RealpathPrefixesTest.cpp
+++ b/lldb/unittests/Utility/RealpathPrefixesTest.cpp
@@ -23,7 +23,6 @@ static FileSpec WindowsSpec(llvm::StringRef path) {
return FileSpec(path, FileSpec::Style::windows);
}
-
// Should resolve a symlink which match an absolute prefix
TEST(RealpathPrefixesTest, MatchingAbsolutePrefix) {
// Prepare FS
@@ -62,8 +61,7 @@ TEST(RealpathPrefixesTest, MatchingRelativePrefix) {
TEST(RealpathPrefixesTest, WindowsAndCaseInsensitive) {
// Prepare FS
llvm::IntrusiveRefCntPtr<MockSymlinkFileSystem> fs(new MockSymlinkFileSystem(
- WindowsSpec("f:\\dir1\\link.h"),
- WindowsSpec("f:\\dir2\\real.h"),
+ WindowsSpec("f:\\dir1\\link.h"), WindowsSpec("f:\\dir2\\real.h"),
FileSpec::Style::windows));
// Prepare RealpathPrefixes
@@ -72,8 +70,8 @@ TEST(RealpathPrefixesTest, WindowsAndCaseInsensitive) {
RealpathPrefixes prefixes(file_spec_list, fs);
// Test
- std::optional<FileSpec> ret = prefixes.ResolveSymlinks(
- WindowsSpec("F:\\DIR1\\LINK.H"));
+ std::optional<FileSpec> ret =
+ prefixes.ResolveSymlinks(WindowsSpec("F:\\DIR1\\LINK.H"));
EXPECT_EQ(ret, WindowsSpec("f:\\dir2\\real.h"));
}
@@ -105,7 +103,8 @@ TEST(RealpathPrefixesTest, ComplexPrefixes) {
// Prepare RealpathPrefixes
FileSpecList file_spec_list;
- file_spec_list.Append(PosixSpec("./dir1/foo/../bar/..")); // Equivalent to "/dir1"
+ file_spec_list.Append(
+ PosixSpec("./dir1/foo/../bar/..")); // Equivalent to "/dir1"
RealpathPrefixes prefixes(file_spec_list, fs);
// Test
``````````
</details>
https://github.com/llvm/llvm-project/pull/104502
More information about the lldb-commits
mailing list