summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/constructor-convert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/constructor-convert.cpp')
-rw-r--r--clang/test/CodeGenCXX/constructor-convert.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/constructor-convert.cpp b/clang/test/CodeGenCXX/constructor-convert.cpp
new file mode 100644
index 0000000..7feeaa9
--- /dev/null
+++ b/clang/test/CodeGenCXX/constructor-convert.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -emit-llvm -o - %s
+
+// PR5775
+class Twine {
+public:
+ Twine(const char *Str) { }
+};
+
+static void error(const Twine &Message) {}
+
+template<typename>
+struct opt_storage {
+ void f() {
+ error("cl::location(x) specified more than once!");
+ }
+};
+
+void f(opt_storage<int> o) {
+ o.f();
+}