blob: 7feeaa900af6e06a066d8d0a1e906ee52a25a43c [file] [log] [blame]
Daniel Dunbar9fde9c42010-06-29 16:52:24 +00001// RUN: %clang_cc1 -emit-llvm -o - %s
Douglas Gregor4411d2e2009-12-14 16:27:04 +00002
3// PR5775
4class Twine {
Douglas Gregor13e1bca2011-10-10 22:41:00 +00005public:
Douglas Gregor4411d2e2009-12-14 16:27:04 +00006 Twine(const char *Str) { }
7};
8
John McCall15e310a2011-02-19 02:53:41 +00009static void error(const Twine &Message) {}
Douglas Gregor4411d2e2009-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}