From bab424d36e0da2d62db749ad5965c1f56c417dff Mon Sep 17 00:00:00 2001 From: Szymon Gizler Date: Thu, 10 Oct 2024 15:09:16 +0200 Subject: [PATCH] Disable macro backslash alignment in clang-format With alignment enabled, nearly every minor change causes reformat of whole macro --- .clang-format | 1 + source/Utils.hpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.clang-format b/.clang-format index 26cb1dd..e707e6c 100644 --- a/.clang-format +++ b/.clang-format @@ -2,3 +2,4 @@ BasedOnStyle: Chromium ColumnLimit: 100 IndentWidth: 4 +AlignEscapedNewlines: DontAlign diff --git a/source/Utils.hpp b/source/Utils.hpp index 55ee94d..24a9d7b 100644 --- a/source/Utils.hpp +++ b/source/Utils.hpp @@ -84,8 +84,8 @@ std::string prefixLines(const std::string& str, const std::string& linePrefix); // NOTE: doing it as variadic func rather than macro would prevent // compiler from issuing warnings about incorrect format string -#define PRINTF_ERR(...) \ - do { \ +#define PRINTF_ERR(...) \ + do { \ fprintf(stderr, "sv-bugpoint: "); \ - fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, __VA_ARGS__); \ } while (0)