diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-07-01 10:37:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-07-01 10:37:29 +0000 |
commit | 07952324dda0e758c17f8bc3015793c65c51c48c (patch) | |
tree | df23760bd379514f0adb730fe44cb2642df6d58c /test/Sema/cxx-this.cpp | |
parent | aae2d7418b7004fde1ba08fe60db219d0c95ff30 (diff) |
Add Sema support for C++ classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/cxx-this.cpp')
-rw-r--r-- | test/Sema/cxx-this.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/cxx-this.cpp b/test/Sema/cxx-this.cpp new file mode 100644 index 0000000000..b8bf4b7d3a --- /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}} +} |