llvmbot wrote:
/pull-request llvm/llvm-project#91165
https://github.com/llvm/llvm-project/pull/91045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
/cherry-pick db0ed5533368
https://github.com/llvm/llvm-project/pull/91045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca milestoned
https://github.com/llvm/llvm-project/pull/91045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/91045
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
owenca wrote:
> I wouldn't worry too much about this, but, pedantically, you can be sure it's
> a fold expression if the ellipsis is followed with or preceded by an operator
>
> https://eel.is/c++draft/expr.prim.fold#nt:fold-operator
I had thought of that but decided not to bother. From
https
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Fixes #90966.
---
Full diff: https://github.com/llvm/llvm-project/pull/91045.diff
2 Files Affected:
- (modified) clang/lib/Format/UnwrappedLineParser.cpp (+6-1)
- (modified) clang/unittests/Format/Forma
https://github.com/rymiel approved this pull request.
I can definitely think of cases where an expression might contain `...` and
still have redundant parentheses, i.e. if the ellipsis isn't part of a fold
expression
For example:
```c++
template
std::tuple foo() {
return (std::tuple{});
}
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/91045
Fixes #90966.
>From 2cc5ef7cca02578262795a7f7ea840d0a1496f74 Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Fri, 3 May 2024 22:15:33 -0700
Subject: [PATCH] [clang-format] Don't remove parentheses of fold expressio