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 { |
Douglas Gregor | 13e1bca | 2011-10-10 22:41:00 +0000 | [diff] [blame] | 5 | public: |
Douglas Gregor | 4411d2e | 2009-12-14 16:27:04 +0000 | [diff] [blame] | 6 | Twine(const char *Str) { } |
| 7 | }; |
| 8 | |
John McCall | 15e310a | 2011-02-19 02:53:41 +0000 | [diff] [blame] | 9 | static void error(const Twine &Message) {} |
Douglas Gregor | 4411d2e | 2009-12-14 16:27:04 +0000 | [diff] [blame] | 10 | |
| 11 | template<typename> |
| 12 | struct opt_storage { |
| 13 | void f() { |
| 14 | error("cl::location(x) specified more than once!"); |
| 15 | } |
| 16 | }; |
| 17 | |
| 18 | void f(opt_storage<int> o) { |
| 19 | o.f(); |
| 20 | } |