Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Argyrios Kyrtzidis | 0795232 | 2008-07-01 10:37:29 +0000 | [diff] [blame] | 2 | int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} |
3 | |||||
4 | void f() { | ||||
5 | int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}} | ||||
6 | } |