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
@@ -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
@@ -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
@@ -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
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
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