In the latest episode of "Deserializing bugs caused by accessors" the series reached...
[clang.git] / test / PCH / namespaces.cpp
blob6dd447318a0b0b170bc3a550d1f6728cd83f5d1b
1 // Test this without pch.
2 // RUN: %clang_cc1 -x c++ -include %S/Inputs/namespaces.h -fsyntax-only %s
4 // Test with pch.
5 // RUN: %clang_cc1 -x c++ -emit-pch -o %t %S/Inputs/namespaces.h
6 // RUN: %clang_cc1 -x c++ -include-pch %t -fsyntax-only %s
8 int int_val;
9 N1::t1 *ip1 = &int_val;
10 N1::t2 *ip2 = &int_val;
11 N2::Inner::t3 *ip3 = &int_val;
13 float float_val;
14 namespace N2 { }
15 N2::t1 *fp1 = &float_val;
17 Alias1::t3 *ip4 = &int_val;
18 t3 *ip5 = &int_val;
20 void(*funp1)() = anon;
22 namespace {
23 class C;
25 C* cp1;
27 namespace N3 {
28 namespace {
29 class C;
33 N3::C *cp2;
35 void(*funp2)() = ext;
37 using N1::used_func;
38 void (*pused)() = used_func;
40 using N1::used_cls;
41 used_cls s1;
42 used_cls* ps1 = &s1;
44 inline namespace N4 { }
45 struct MemberOfN4 *mn4;