aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaTemplate/concepts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaTemplate/concepts.cpp')
-rw-r--r--clang/test/SemaTemplate/concepts.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/concepts.cpp b/clang/test/SemaTemplate/concepts.cpp
index 62a4f95..663bc98 100644
--- a/clang/test/SemaTemplate/concepts.cpp
+++ b/clang/test/SemaTemplate/concepts.cpp
@@ -1250,3 +1250,11 @@ static_assert(!D<Priv>::has, "Private should be invisible.");
static_assert(!D<Prot>::has, "Protected should be invisible.");
}
+
+
+namespace GH149986 {
+template <typename T> concept PerfectSquare = [](){} // expected-note 2{{here}}
+([](auto) { return true; }) < PerfectSquare <class T>;
+// expected-error@-1 {{declaration of 'T' shadows template parameter}} \
+// expected-error@-1 {{a concept definition cannot refer to itself}}
+}