blob: aec62ddd97a763eec0e7ce5161e37a7ad8c53f1d [file] [log] [blame]
Richard Smith9ca5c422011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Richard Smith938f40b2011-06-11 17:19:42 +00002
3struct S {
4 int *j = &nonexistent; // expected-error {{use of undeclared identifier 'nonexistent'}}
5 int *m = &n; // ok
6
7 int n = f(); // ok
8 int f();
9};
10
11int i = sizeof(S::m); // ok
12int j = sizeof(S::m + 42); // ok