summaryrefslogtreecommitdiffstats
path: root/test/PCH/chain-cxx.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-08-24 00:50:16 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-08-24 00:50:16 +0000
commit5967d6228f183a5fa384f2f1918df679ed2d8666 (patch)
treeb48a3c221500177826b3711880470c11f3be2df7 /test/PCH/chain-cxx.cpp
parent1d1e42b17da6a53391d50b08068ecde04311e368 (diff)
Add testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH/chain-cxx.cpp')
-rw-r--r--test/PCH/chain-cxx.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/PCH/chain-cxx.cpp b/test/PCH/chain-cxx.cpp
new file mode 100644
index 0000000000..450a791828
--- /dev/null
+++ b/test/PCH/chain-cxx.cpp
@@ -0,0 +1,23 @@
+// Test C++ chained PCH functionality
+
+// Without PCH
+// RUN: %clang_cc1 -fsyntax-only -verify -include %S/Inputs/chain-cxx1.h -include %S/Inputs/chain-cxx2.h %s
+
+// With PCH
+// RUN: %clang_cc1 -x c++ -emit-pch -o %t1 %S/Inputs/chain-cxx1.h
+// RUN: %clang_cc1 -x c++ -emit-pch -o %t2 %S/Inputs/chain-cxx2.h -include-pch %t1 -chained-pch
+// RUN: %clang_cc1 -fsyntax-only -verify -include-pch %t2 %s
+
+void test() {
+ f();
+ f(1);
+ pf();
+ f2();
+
+ ns::g();
+ ns::g(1);
+ ns::pg();
+ ns::g2();
+
+ //typedef S<int>::I J;
+}