Add Sema support for C++ classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/cxx-this.cpp b/test/Sema/cxx-this.cpp
new file mode 100644
index 0000000..b8bf4b7
--- /dev/null
+++ b/test/Sema/cxx-this.cpp
@@ -0,0 +1,6 @@
+// RUN: clang -fsyntax-only -verify %s
+int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}}
+
+void f() {
+ int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}}
+}