From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/PCH/chain-pending-instantiations.cpp | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 clang/test/PCH/chain-pending-instantiations.cpp (limited to 'clang/test/PCH/chain-pending-instantiations.cpp') diff --git a/clang/test/PCH/chain-pending-instantiations.cpp b/clang/test/PCH/chain-pending-instantiations.cpp new file mode 100644 index 0000000..e49abcd --- /dev/null +++ b/clang/test/PCH/chain-pending-instantiations.cpp @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - -chain-include %s -chain-include %s | FileCheck %s +// CHECK: define linkonce_odr %{{[^ ]+}} @_ZN1AI1BE3getEv +#if !defined(PASS1) +#define PASS1 + +template +struct A { + Derived* get() { return 0; } +}; + +struct B : A { +}; + +#elif !defined(PASS2) +#define PASS2 + +struct C : B { +}; + +struct D : C { + void run() { + (void)get(); + } +}; + +#else + +int main() { + D d; + d.run(); +} + +#endif -- cgit v1.2.3