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 c,h,cpp -- 
clang/test/Preprocessor/hardlink-include-names.c 
clang/include/clang/Basic/SourceManager.h clang/lib/Basic/SourceManager.cpp 
clang/unittests/Basic/SourceManagerTest.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/lib/Basic/SourceManager.cpp 
b/clang/lib/Basic/SourceManager.cpp
index bb4f4c6d8..b27a07dc6 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -47,9 +47,8 @@ using llvm::MemoryBuffer;
 
 #define DEBUG_TYPE "source-manager"
 
-static SrcMgr::ContentCache *
-cloneContentCache(llvm::BumpPtrAllocator &Alloc,
-                  const ContentCache &Other) {
+static SrcMgr::ContentCache *cloneContentCache(llvm::BumpPtrAllocator &Alloc,
+                                               const ContentCache &Other) {
   auto *Clone = new (Alloc.Allocate<ContentCache>()) ContentCache;
   Clone->OrigEntry = Other.OrigEntry;
   Clone->ContentsEntry = Other.ContentsEntry;
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp 
b/clang/unittests/Basic/SourceManagerTest.cpp
index c4d1763ee..2594d35a1 100644
--- a/clang/unittests/Basic/SourceManagerTest.cpp
+++ b/clang/unittests/Basic/SourceManagerTest.cpp
@@ -50,16 +50,15 @@ public:
     StatCalls[Path] = llvm::vfs::Status(
         Path, llvm::sys::fs::UniqueID(1, INode), /*MTime=*/{},
         /*User=*/0, /*Group=*/0, /*Size=*/0,
-        llvm::sys::fs::file_type::regular_file,
-        llvm::sys::fs::perms::all_all);
+        llvm::sys::fs::file_type::regular_file, llvm::sys::fs::perms::all_all);
   }
 
   void InjectDirectory(StringRef Path, ino_t INode) {
-    StatCalls[Path] = llvm::vfs::Status(
-        Path, llvm::sys::fs::UniqueID(1, INode), /*MTime=*/{},
-        /*User=*/0, /*Group=*/0, /*Size=*/0,
-        llvm::sys::fs::file_type::directory_file,
-        llvm::sys::fs::perms::all_all);
+    StatCalls[Path] =
+        llvm::vfs::Status(Path, llvm::sys::fs::UniqueID(1, INode), 
/*MTime=*/{},
+                          /*User=*/0, /*Group=*/0, /*Size=*/0,
+                          llvm::sys::fs::file_type::directory_file,
+                          llvm::sys::fs::perms::all_all);
   }
 
   std::error_code getStat(StringRef Path, llvm::vfs::Status &Status,

``````````

</details>


https://github.com/llvm/llvm-project/pull/189475
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to