From a729c15e9dce9f5116a38afc66329ab2ca4cea54 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 13:59:28 +0800 Subject: preparation for clang format (#5422) * Clang-format excludes * Add .clang-format * Don't clang-format in external * Missing includes and forward declarations * Replace wonky include-once macro name * neaten include naming * Add clang-format to formatting script * Add xargs and diff to required binaries * add clang-format to ci formatting check * Add max version check to formatting script * temporarily disable checking formatting for cpp files --- include/.clang-format | 2 ++ include/slang-gfx.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 include/.clang-format (limited to 'include') diff --git a/include/.clang-format b/include/.clang-format new file mode 100644 index 000000000..12ac8862d --- /dev/null +++ b/include/.clang-format @@ -0,0 +1,2 @@ +BasedOnStyle: InheritParentConfig +IndentPPDirectives: BeforeHash diff --git a/include/slang-gfx.h b/include/slang-gfx.h index 207b3e136..7756d76da 100644 --- a/include/slang-gfx.h +++ b/include/slang-gfx.h @@ -199,6 +199,7 @@ public: // TODO: Confirm with Yong that we really want this naming convention // TODO: Rename to what? // Dont' change without keeping in sync with Format +// clang-format off #define GFX_FORMAT(x) \ x( Unknown, 0, 0) \ \ @@ -304,8 +305,9 @@ public: \ x(R64_UINT, 8, 1) \ \ - x(R64_SINT, 8, 1) \ - \ + x(R64_SINT, 8, 1) +// clang-format on + // TODO: This should be generated from above // TODO: enum class should be explicitly uint32_t or whatever's appropriate /// Different formats of things like pixels or elements of vertices -- cgit v1.2.3