blob: 9122dae128ecaa8b8be6ec8f7a6d0b78c57b5dd7 [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 {
5 Twine(const char *Str) { }
6};
7
John McCall15e310a2011-02-19 02:53:41 +00008static void error(const Twine &Message) {}
Douglas Gregor4411d2e2009-12-14 16:27:04 +00009
10template<typename>
11struct opt_storage {
12 void f() {
13 error("cl::location(x) specified more than once!");
14 }
15};
16
17void f(opt_storage<int> o) {
18 o.f();
19}