1 // Test this without pch. 2 // RUN: %clang_cc1 -x c++ -std=c++11 -DHEADER -DSOURCE -fsyntax-only -emit-llvm -o - %s 3 4 // Test with pch. 5 // RUN: %clang_cc1 -x c++ -std=c++11 -DHEADER -emit-pch -o %t %s 6 // RUN: %clang_cc1 -x c++ -std=c++11 -DHEADER -include-pch %t -fsyntax-only -emit-llvm -o - %s 7 8 #ifdef HEADER 9 int n; 10 struct S { 11 int *p = &m; 12 int &m = n; 13 S *that = this; 14 }; 15 template<typename T> struct X { T t {0}; }; 16 #endif 17 18 #ifdef SOURCE 19 S s; 20 21 struct E { explicit E(int); }; 22 X<E> x; 23 #elif HEADER 24 #undef HEADER 25 #define SOURCE 26 #endif 27