Daniel Dunbar | 9fde9c4 | 2010-06-29 16:52:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s |
Douglas Gregor | 4411d2e | 2009-12-14 16:27:04 +0000 | [diff] [blame] | 2 | |
| 3 | // PR5775 |
| 4 | class Twine { |
| 5 | Twine(const char *Str) { } |
| 6 | }; |
| 7 | |
John McCall | 15e310a | 2011-02-19 02:53:41 +0000 | [diff] [blame] | 8 | static void error(const Twine &Message) {} |
Douglas Gregor | 4411d2e | 2009-12-14 16:27:04 +0000 | [diff] [blame] | 9 | |
| 10 | template<typename> |
| 11 | struct opt_storage { |
| 12 | void f() { |
| 13 | error("cl::location(x) specified more than once!"); |
| 14 | } |
| 15 | }; |
| 16 | |
| 17 | void f(opt_storage<int> o) { |
| 18 | o.f(); |
| 19 | } |