Daniel Dunbar | 80737ad | 2009-12-15 22:01:24 +0000 | [diff] [blame] | 1 | // RUN: %clang -emit-llvm -S -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 | |||||
8 | static void error(const Twine &Message); | ||||
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 | } |