[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 17 00:27:25 PDT 2024
================
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s
+
+auto x0 = requires (this int) { true; }; // expected-error {{a requires clause cannot have an explicit object parameter}}
+auto x1 = requires (int, this int) { true; }; // expected-error {{a requires clause cannot have an explicit object parameter}}
----------------
cor3ntin wrote:
Can you add a test for `template <this auto> void f()` ?
https://github.com/llvm/llvm-project/pull/88974
More information about the cfe-commits
mailing list