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