xref: /llvm-project/clang/test/CodeGenCXX/constructor-convert.cpp (revision c7a3107bafeff517d301df8e6cd4bee36afbe5cd)
18452ef07SDaniel Dunbar // RUN: %clang_cc1 -emit-llvm -o - %s
2db121badSDouglas Gregor 
3db121badSDouglas Gregor // PR5775
4db121badSDouglas Gregor class Twine {
5*c7a3107bSDouglas Gregor public:
Twine(const char * Str)6db121badSDouglas Gregor   Twine(const char *Str) { }
7db121badSDouglas Gregor };
8db121badSDouglas Gregor 
error(const Twine & Message)983779675SJohn McCall static void error(const Twine &Message) {}
10db121badSDouglas Gregor 
11db121badSDouglas Gregor template<typename>
12db121badSDouglas Gregor struct opt_storage {
fopt_storage13db121badSDouglas Gregor   void f() {
14db121badSDouglas Gregor     error("cl::location(x) specified more than once!");
15db121badSDouglas Gregor   }
16db121badSDouglas Gregor };
17db121badSDouglas Gregor 
f(opt_storage<int> o)18db121badSDouglas Gregor void f(opt_storage<int> o) {
19db121badSDouglas Gregor   o.f();
20db121badSDouglas Gregor }
21