[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/148345 >From 3affefb96efe2d2955be66c247276b81d5d1d3a1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 12 Jul 2025 00:09:49 -0700 Subject: [PATCH 1/2] [clang-format] Add FunctionLikeMacros option This allows RemovePa

[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-13 Thread Björn Schäpers via cfe-commits
@@ -2786,6 +2786,11 @@ struct FormatStyle { /// \version 3.7 std::vector ForEachMacros; + /// A vector of function-like macros whose invocations should be skipped by + /// ``RemoveParentheses``. + /// \version 21 + std::vector FunctionLikeMacros; Hazar

[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-12 Thread Owen Pan via cfe-commits
@@ -2786,6 +2786,11 @@ struct FormatStyle { /// \version 3.7 std::vector ForEachMacros; + /// A vector of function-like macros whose invocations should be skipped by + /// ``RemoveParentheses``. + /// \version 21 + std::vector FunctionLikeMacros; owenc

[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-12 Thread Björn Schäpers via cfe-commits
@@ -2786,6 +2786,11 @@ struct FormatStyle { /// \version 3.7 std::vector ForEachMacros; + /// A vector of function-like macros whose invocations should be skipped by + /// ``RemoveParentheses``. + /// \version 21 + std::vector FunctionLikeMacros; Hazar

[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes This allows RemoveParentheses to skip the invocations of function-like macros. Fixes #68354. Fixes #147780. --- Full diff: https://github.com/llvm/llvm-project/pull/148345.diff 11 Files Affected: - (mod

[clang] [clang-format] Add FunctionLikeMacros option (PR #148345)

2025-07-12 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/148345 This allows RemoveParentheses to skip the invocations of function-like macros. Fixes #68354. Fixes #147780. >From 3affefb96efe2d2955be66c247276b81d5d1d3a1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 12 J