diff options
| author | Andrew Trick <atrick@apple.com> | 2010-10-19 21:14:46 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2010-10-19 21:14:46 +0000 |
| commit | b20ed574ab500fd27cdb61c95660345fd7b9a07b (patch) | |
| tree | 441de7f9050214647274b19c3a71c7ad780ebde7 /clang/test/PCH/chain-cxx.cpp | |
| parent | b4aa503501052658fc4759498c3c78ba5cc46df1 (diff) | |
| download | bcm5719-llvm-b20ed574ab500fd27cdb61c95660345fd7b9a07b.tar.gz bcm5719-llvm-b20ed574ab500fd27cdb61c95660345fd7b9a07b.zip | |
Reverting 116836,116837,116838 until we resolve the getLangStandardForKind failures.
llvm-svn: 116859
Diffstat (limited to 'clang/test/PCH/chain-cxx.cpp')
| -rw-r--r-- | clang/test/PCH/chain-cxx.cpp | 73 |
1 files changed, 3 insertions, 70 deletions
diff --git a/clang/test/PCH/chain-cxx.cpp b/clang/test/PCH/chain-cxx.cpp index b2d05234106..3e46214c70b 100644 --- a/clang/test/PCH/chain-cxx.cpp +++ b/clang/test/PCH/chain-cxx.cpp @@ -1,77 +1,13 @@ // Test C++ chained PCH functionality // Without PCH -// RUN: %clang_cc1 -fsyntax-only -verify -include %s -include %s %s +// 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++-header -emit-pch -o %t1 %s -// RUN: %clang_cc1 -x c++-header -emit-pch -o %t2 %s -include-pch %t1 -chained-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 -#ifndef HEADER1 -#define HEADER1 -//===----------------------------------------------------------------------===// -// Primary header for C++ chained PCH test - -void f(); - -// Name not appearing in dependent -void pf(); - -namespace ns { - void g(); - - void pg(); -} - -template <typename T> -struct S { typedef int G; }; - -// Partially specialize -template <typename T> -struct S<T *> { typedef int H; }; - -//===----------------------------------------------------------------------===// -#elif not defined(HEADER2) -#define HEADER2 -//===----------------------------------------------------------------------===// -// Dependent header for C++ chained PCH test - -// Overload function from primary -void f(int); - -// Add function with different name -void f2(); - -// Reopen namespace -namespace ns { - // Overload function from primary - void g(int); - - // Add different name - void g2(); -} - -// Specialize template from primary -template <> -struct S<int> { typedef int I; }; - -// Partially specialize -template <typename T> -struct S<T &> { typedef int J; }; - -// Specialize previous partial specialization -template <> -struct S<int *> { typedef int K; }; - -// Specialize the partial specialization from this file -template <> -struct S<int &> { typedef int L; }; - -//===----------------------------------------------------------------------===// -#else -//===----------------------------------------------------------------------===// - void test() { f(); f(1); @@ -90,6 +26,3 @@ void test() { typedef S<int *>::K T5; typedef S<int &>::L T6; } - -//===----------------------------------------------------------------------===// -#endif |

