Diagnose use of 'this' in a C++ default argument. Thanks to Eli for correcting my bogus assertion about it already being handled

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58691 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/default2.cpp b/test/SemaCXX/default2.cpp
index 89eb467..d55045d 100644
--- a/test/SemaCXX/default2.cpp
+++ b/test/SemaCXX/default2.cpp
@@ -39,4 +39,8 @@
 
 class X {
   void f(X* x = this); // expected-error{{invalid use of 'this' outside of a nonstatic member function}}
+
+  void g() { 
+    int f(X* x = this); // expected-error{{default argument references 'this'}}
+  }
 };