diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-24 00:50:16 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2010-08-24 00:50:16 +0000 |
| commit | 9617e7e8c7530f04c4be3a296890fa44902aa1ef (patch) | |
| tree | 1925ad1645b680bf3fc2754601bca16940fac9bf /clang/test/PCH/chain-cxx.cpp | |
| parent | a4071b4fac77e679cff6585a3c819f702a357ac8 (diff) | |
| download | bcm5719-llvm-9617e7e8c7530f04c4be3a296890fa44902aa1ef.tar.gz bcm5719-llvm-9617e7e8c7530f04c4be3a296890fa44902aa1ef.zip | |
Add testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.
llvm-svn: 111882
Diffstat (limited to 'clang/test/PCH/chain-cxx.cpp')
| -rw-r--r-- | clang/test/PCH/chain-cxx.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/PCH/chain-cxx.cpp b/clang/test/PCH/chain-cxx.cpp new file mode 100644 index 00000000000..450a7918286 --- /dev/null +++ b/clang/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; +} |

