================ @@ -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@-1 {{because 'false_v<requires (short ts, unsigned short ts) { requires (sizeof (ts) == 2) && (sizeof (ts) == 2); }>'}} -// expected-note@-2 {{because 'false_v<requires (short ts) { requires (sizeof (ts) == 2); }>' evaluated to false}} +// expected-note@-2 {{because 'false_v<requires (short ts) { requires sizeof (ts) == 2; }>' evaluated to false}} ---------------- erichkeane wrote:
Thats the discussion we had in a separate thread, we don't really see how, without modifying the ParenExpr to say that it is the result of a fold expr expansion. As far as 'modify the ast', depending on your perspective/mental model here, the parens are a part of the 'fold expr' rather than part of the expr being folded. In this case, if you consider the `( ) && ...` to effectively be the fold expr syntax, removing it seems to make a ton of sense. But yeah, we couldn't think of a good way to suppress the warning otherwise (or, like i mentioned, a flag on `ParenExpr` to say that the `ParenExpr` is a part of a single-element-fold-expr-expansion). The diagnostic just sees the expression after expansion, so as far as it knows, you did `if ((a == b))` instead of `if ((a==b) && ...)` but only had a single element. https://github.com/llvm/llvm-project/pull/110761 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits