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 | ed9834272fa3fe9f2c2ede7ec29800ae4cd260da (patch) | |
| tree | 13e0fd96e6de953c8a8f9e548f5242cfbb3b4fa0 /clang/test/Sema/cxx-this.cpp | |
| parent | b55e5ece9614e328f9a8d4367f1c08048b3387a2 (diff) | |
| download | bcm5719-llvm-ed9834272fa3fe9f2c2ede7ec29800ae4cd260da.tar.gz bcm5719-llvm-ed9834272fa3fe9f2c2ede7ec29800ae4cd260da.zip | |
Add Sema support for C++ classes.
llvm-svn: 52956
Diffstat (limited to 'clang/test/Sema/cxx-this.cpp')
| -rw-r--r-- | clang/test/Sema/cxx-this.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/cxx-this.cpp b/clang/test/Sema/cxx-this.cpp new file mode 100644 index 00000000000..b8bf4b7d3aa --- /dev/null +++ b/clang/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}} +} |

