1// RUN: %clang_cc1 -fsyntax-only -verify %s
2int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
3
4void f() {
5  int x = this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
6}
7