23 lines · cpp
1// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s2 3// This is a testcase for LLVM PR445, which was a problem where the4// instantiation of callDefaultCtor was not being emitted correctly.5 6// CHECK-NOT: declare{{.*}}callDefaultCtor7struct Pass {};8 9template<typename PassName>10Pass *callDefaultCtor() { return new Pass(); }11 12void foo(Pass *(*C)());13 14struct basic_string {15 bool empty() const { return true; }16};17 18 19bool foo2(basic_string &X) {20 return X.empty();21}22void baz() { foo(callDefaultCtor<Pass>); }23