fix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
[llvm/avr.git] / test / FrontendC++ / 2004-09-27-DidntEmitTemplate.cpp
blob706d541bee678e292bb0d7b15c06f53828e1098b
1 // RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | \
2 // RUN: not grep declare
4 // This is a testcase for LLVM PR445, which was a problem where the
5 // instantiation of callDefaultCtor was not being emitted correctly.
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>); }