blob: 0ff29a18825b0c4a496c7806cb71841e1b10696e [file] [log] [blame]
Richard Smith7a614d82011-06-11 17:19:42 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2
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