[clang] [Clang] omit parentheses in fold expressions with a single expansion (PR #110761)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 4 09:34:04 PDT 2024
================
@@ -36,7 +36,7 @@ using r1i2 = r1<char>; // expected-error {{constraints not satisfied for class t
template<typename... Ts> requires
false_v<requires (Ts... ts) {requires ((sizeof(ts) == 2) && ...);}>
// expected-note at -1 {{because 'false_v<requires (short ts, unsigned short ts) { requires (sizeof (ts) == 2) && (sizeof (ts) == 2); }>'}}
-// expected-note at -2 {{because 'false_v<requires (short ts) { requires (sizeof (ts) == 2); }>' evaluated to false}}
+// expected-note at -2 {{because 'false_v<requires (short ts) { requires sizeof (ts) == 2; }>' evaluated to false}}
----------------
a-tarasyuk wrote:
> The only thing I could come up with that this MIGHT cause an issue (which, not ruling out the Decltype above!),
I briefly looked into some new cases with `decltype`, and it seems it's unsafe to omit the `()`. I’ll take a closer look at those cases...
https://github.com/llvm/llvm-project/pull/110761
More information about the cfe-commits
mailing list