aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/default2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/default2.cpp')
-rw-r--r--test/SemaCXX/default2.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/default2.cpp b/test/SemaCXX/default2.cpp
index d3e999c34c..89eb4671d9 100644
--- a/test/SemaCXX/default2.cpp
+++ b/test/SemaCXX/default2.cpp
@@ -36,3 +36,7 @@ void nondecl(int (*f)(int x = 5)) // {expected-error {{default arguments can onl
void (*f2)(int = 17) // {expected-error {{default arguments can only be specified}}}
= (void (*)(int = 42))f; // {expected-error {{default arguments can only be specified}}}
}
+
+class X {
+ void f(X* x = this); // expected-error{{invalid use of 'this' outside of a nonstatic member function}}
+};