7 lines
267 B
C++
7 lines
267 B
C++
|
// RUN: clang-cc -fsyntax-only -verify %s
|
||
|
int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}}
|
||
|
|
||
|
void f() {
|
||
|
int x = this; // expected-error {{error: invalid use of 'this' outside of a nonstatic member function}}
|
||
|
}
|