Improve diagnostics for invalid use of non-static members / this:

* s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted
  the former by 28-2 in our diagnostics.
* Fix the "use of member in static member function" diagnostic to correctly
  detect this situation inside a block or lambda.
* Produce a more specific "invalid use of non-static member" diagnostic for
  the case where a nested class member refers to a member of a
  lexically-surrounding class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154073 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/this.cpp b/test/SemaCXX/this.cpp
index 13158b9..27ee1e8 100644
--- a/test/SemaCXX/this.cpp
+++ b/test/SemaCXX/this.cpp
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s 
-int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
+int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
 
 void f() {
-  int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
+  int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
 }