[clang] [ClangFormat] Fix formatting bugs. (PR #76245)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 31 20:10:20 PST 2023
================
@@ -2919,6 +2912,12 @@ class ExpressionParser {
void addFakeParenthesis(FormatToken *Start, prec::Level Precedence,
FormatToken *End = nullptr) {
+ // Do not assign fake parenthesis to tokens that are part of an
+ // unexpanded macro call. The line within the macro call contains
+ // the parenthesis and commas, and we will not find operators within
+ // that structure.
+ if (Start->MacroParent) return;
----------------
owenca wrote:
Please run git-clang-format locally. See [here](https://github.com/llvm/llvm-project/pull/76059#issuecomment-1865850011).
https://github.com/llvm/llvm-project/pull/76245
More information about the cfe-commits
mailing list