blob: 7feeaa900af6e06a066d8d0a1e906ee52a25a43c [file] [log] [blame]
Daniel Dunbar8452ef02010-06-29 16:52:24 +00001// RUN: %clang_cc1 -emit-llvm -o - %s
Douglas Gregordb121ba2009-12-14 16:27:04 +00002
3// PR5775
4class Twine {
Douglas Gregorc7a31072011-10-10 22:41:00 +00005public:
Douglas Gregordb121ba2009-12-14 16:27:04 +00006 Twine(const char *Str) { }
7};
8
John McCall83779672011-02-19 02:53:41 +00009static void error(const Twine &Message) {}
Douglas Gregordb121ba2009-12-14 16:27:04 +000010
11template<typename>
12struct opt_storage {
13 void f() {
14 error("cl::location(x) specified more than once!");
15 }
16};
17
18void f(opt_storage<int> o) {
19 o.f();
20}