blob: 13158b93a4444ebd15b551f7b6978e9b88910e29 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Richard Trieu2fe9b7f2011-12-15 00:38:15 +00002int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
Argyrios Kyrtzidis07952322008-07-01 10:37:29 +00003
4void f() {
Richard Trieu2fe9b7f2011-12-15 00:38:15 +00005 int x = this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
Argyrios Kyrtzidis07952322008-07-01 10:37:29 +00006}