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