[clang] [Clang][Sema] Reject array prvalue operands (PR #140702)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 20 20:03:23 PDT 2025
================
@@ -7639,6 +7639,8 @@ def warn_param_mismatched_alignment : Warning<
def err_objc_object_assignment : Error<
"cannot assign to class object (%0 invalid)">;
+def err_typecheck_array_prvalue_operand : Error<
+ "array prvalue is not permitted">;
----------------
Sirraide wrote:
```suggestion
"operand of '%0' cannot be an array prvalue">;
```
I think it’s a bit clearer if we phrase it like this and also print out the operator rather than just saying ‘X is not permitted’.
https://github.com/llvm/llvm-project/pull/140702
More information about the cfe-commits
mailing list