2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2012-04-05 09:13:04 +08:00
|
|
|
int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
|
2008-07-01 18:37:29 +08:00
|
|
|
|
|
|
|
void f() {
|
2012-04-05 09:13:04 +08:00
|
|
|
int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
|
2008-07-01 18:37:29 +08:00
|
|
|
}
|