[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / CodeGenCXX / 2004-09-27-DidntEmitTemplate.cpp
blob618894fd7248ecaa0d97f21728be89ce21794c44
1 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
3 // This is a testcase for LLVM PR445, which was a problem where the
4 // instantiation of callDefaultCtor was not being emitted correctly.
6 // CHECK-NOT: declare{{.*}}callDefaultCtor
7 struct Pass {};
9 template<typename PassName>
10 Pass *callDefaultCtor() { return new Pass(); }
12 void foo(Pass *(*C)());
14 struct basic_string {
15 bool empty() const { return true; }
19 bool foo2(basic_string &X) {
20 return X.empty();
22 void baz() { foo(callDefaultCtor<Pass>); }