[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue May 28 07:26:53 PDT 2024
================
@@ -7525,6 +7525,8 @@ def err_explicit_object_parameter_mutable: Error<
def err_invalid_explicit_object_type_in_lambda: Error<
"invalid explicit object parameter type %0 in lambda with capture; "
"the type must be the same as, or derived from, the lambda">;
+def err_explicit_object_parameter_invalid: Error<
+ "an explicit object parameter is not allowed here">;
----------------
AaronBallman wrote:
"here" is pretty ambiguous. Any chance we can reuse the `an explicit object parameter cannot appear in a non-member function` diagnostic, add a `%select` to it, and give specific names for what "here" is?
https://github.com/llvm/llvm-project/pull/89078
More information about the cfe-commits
mailing list