Skip to content

Conversation

AnastaZIuk
Copy link
Member

No description provided.

Copy link

PR description is empty, please add some valid description

Copy link

github-actions bot commented Apr 18, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 5ab4d368b666d365217c751f5610b496b828ff96 2661dd0db39ceddd2c4c0289f0387e8806fa3d0b -- include/dxc/WinEtwAdapter.h include/dxc/Support/dxcapi.use.h include/dxc/WinAdapter.h include/llvm/CodeGen/SchedulerRegistry.h lib/IR/Core.cpp lib/MSSupport/MSFileSystemImpl.cpp projects/dxilconv/tools/dxilconv/dxilconv.cpp tools/clang/tools/dxcompiler/DXCompiler.cpp tools/clang/tools/dxcompiler/dxcapi.cpp tools/clang/tools/dxcompiler/dxcompilerobj.cpp tools/clang/tools/dxcvalidator/dxcvalidator.cpp tools/clang/tools/dxildll/dxildll.cpp tools/clang/tools/dxrfallbackcompiler/DXCompiler.cpp tools/clang/tools/dxrfallbackcompiler/dxcapi.cpp
View the diff from clang-format here.
diff --git a/include/dxc/Support/dxcapi.use.h b/include/dxc/Support/dxcapi.use.h
index 747a7ca2d..dee105030 100644
--- a/include/dxc/Support/dxcapi.use.h
+++ b/include/dxc/Support/dxcapi.use.h
@@ -34,7 +34,8 @@ protected:
     m_dll = LoadLibraryA(dllName);
     if (m_dll == nullptr)
       return HRESULT_FROM_WIN32(GetLastError());
-    m_createFn = reinterpret_cast<DxcCreateInstanceProc>(reinterpret_cast<void *>(GetProcAddress(m_dll, fnName)));
+    m_createFn = reinterpret_cast<DxcCreateInstanceProc>(
+        reinterpret_cast<void *>(GetProcAddress(m_dll, fnName)));
 
     if (m_createFn == nullptr) {
       HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
@@ -64,7 +65,8 @@ protected:
       fnName2[s] = '2';
       fnName2[s + 1] = '\0';
 #ifdef _WIN32
-      m_createFn2 = reinterpret_cast<DxcCreateInstance2Proc>(reinterpret_cast<void *>(GetProcAddress(m_dll, fnName2)));
+      m_createFn2 = reinterpret_cast<DxcCreateInstance2Proc>(
+          reinterpret_cast<void *>(GetProcAddress(m_dll, fnName2)));
 #else
       m_createFn2 = (DxcCreateInstance2Proc)::dlsym(m_dll, fnName2);
 #endif
diff --git a/include/dxc/WinAdapter.h b/include/dxc/WinAdapter.h
index b034681c2..826790a48 100644
--- a/include/dxc/WinAdapter.h
+++ b/include/dxc/WinAdapter.h
@@ -198,7 +198,8 @@
 #define OutputDebugStringA(msg) fputs(msg, stderr)
 #define OutputDebugFormatA(...) fprintf(stderr, __VA_ARGS__)
 
-// I have no idea if I don't break something like INSTALL targets, requires CI tests
+// I have no idea if I don't break something like INSTALL targets, requires CI
+// tests
 #include "WinEtwAdapter.h"
 
 #define UInt32Add UIntAdd
diff --git a/include/llvm/CodeGen/SchedulerRegistry.h b/include/llvm/CodeGen/SchedulerRegistry.h
index 04d244125..5e26252d2 100644
--- a/include/llvm/CodeGen/SchedulerRegistry.h
+++ b/include/llvm/CodeGen/SchedulerRegistry.h
@@ -40,8 +40,11 @@ public:
   static MachinePassRegistry Registry;
 
   RegisterScheduler(const char *N, const char *D, FunctionPassCtor C)
-      : MachinePassRegistryNode(N, D, reinterpret_cast<MachinePassCtor>(reinterpret_cast<void *>(C)))
-  { Registry.Add(this); }
+      : MachinePassRegistryNode(
+            N, D,
+            reinterpret_cast<MachinePassCtor>(reinterpret_cast<void *>(C))) {
+    Registry.Add(this);
+  }
   ~RegisterScheduler() { Registry.Remove(this); }
 
 
@@ -54,10 +57,12 @@ public:
     return (RegisterScheduler *)Registry.getList();
   }
   static FunctionPassCtor getDefault() {
-    return reinterpret_cast<FunctionPassCtor>(reinterpret_cast<void *>(Registry.getDefault()));
+    return reinterpret_cast<FunctionPassCtor>(
+        reinterpret_cast<void *>(Registry.getDefault()));
   }
   static void setDefault(FunctionPassCtor C) {
-    Registry.setDefault(reinterpret_cast<MachinePassCtor>(reinterpret_cast<void *>(C)));
+    Registry.setDefault(
+        reinterpret_cast<MachinePassCtor>(reinterpret_cast<void *>(C)));
   }
   static void setListener(MachinePassRegistryListener *L) {
     Registry.setListener(L);
diff --git a/lib/MSSupport/MSFileSystemImpl.cpp b/lib/MSSupport/MSFileSystemImpl.cpp
index ca734f7b4..e75019bef 100644
--- a/lib/MSSupport/MSFileSystemImpl.cpp
+++ b/lib/MSSupport/MSFileSystemImpl.cpp
@@ -323,8 +323,7 @@ typedef BOOLEAN(WINAPI *PtrCreateSymbolicLinkW)(
 
 PtrCreateSymbolicLinkW create_symbolic_link_api =
     PtrCreateSymbolicLinkW(reinterpret_cast<void *>(::GetProcAddress(
-        ::GetModuleHandleW(L"Kernel32.dll"),
-                                            "CreateSymbolicLinkW")));
+        ::GetModuleHandleW(L"Kernel32.dll"), "CreateSymbolicLinkW")));
 } // namespace
 #endif
 
  • Check this box to apply formatting changes to this branch.

@AnastaZIuk AnastaZIuk merged commit 71f2766 into devshFixes May 19, 2025
1 of 2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant