cor3ntin added inline comments.

================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7280
+  "a %select{function|lambda}0 with an explicit object parameter cannot "
+  "%select{be const|be mutable|have reference qualifiers|be volatile}1">;
+def err_invalid_explicit_object_type_in_lambda: Error<
----------------
aaron.ballman wrote:
> I think you're missing `restrict` here as well. Perhaps this is a case where 
> it's better to diagnose the qualifiers generically and rely on the 
> diagnostic's source range? e.g., `cannot have qualifiers` instead of the 
> current %1 selection. This also works around weird with things like `void 
> func() const &;` where it has multiple qualifiers.
Forming a source range to the qualifiers may be challenging though.

In what case would `restrict` come into play?

```
struct test {
    void f() restrict;
};
```
does not seem valid, I'm assuming  it is in some language mode?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140828/new/

https://reviews.llvm.org/D140828

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to