freebsd-dev/test/CodeGenCXX/constructor-convert.cpp

21 lines
305 B
C++
Raw Normal View History

2010-07-13 17:21:42 +00:00
// RUN: %clang_cc1 -emit-llvm -o - %s
2009-12-15 18:49:47 +00:00
// PR5775
class Twine {
public:
2009-12-15 18:49:47 +00:00
Twine(const char *Str) { }
};
static void error(const Twine &Message) {}
2009-12-15 18:49:47 +00:00
template<typename>
struct opt_storage {
void f() {
error("cl::location(x) specified more than once!");
}
};
void f(opt_storage<int> o) {
o.f();
}