blob: 70392a283261421941835c2bfb0b37a7e3084b45 [file] [log] [blame]
Richard Smith7a614d82011-06-11 17:19:42 +00001// Test this without pch.
2// RUN: %clang_cc1 -x c++ -std=c++0x -DHEADER -DSOURCE -fsyntax-only -emit-llvm -o - %s
3
4// Test with pch.
5// RUN: %clang_cc1 -x c++ -std=c++0x -DHEADER -emit-pch -o %t %s
6// RUN: %clang_cc1 -x c++ -std=c++0x -DHEADER -include-pch %t -fsyntax-only -emit-llvm -o - %s
7
8#ifdef HEADER
9int n;
10struct S {
11 int *p = &m;
12 int &m = n;
13 S *that = this;
14};
15#endif
16
17#ifdef SOURCE
18S s;
19#elif HEADER
20#undef HEADER
21#define SOURCE
22#endif