blob: b0c2aa8afa911e743c1996b91fd1038ac9f53297 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Sebastian Redl42dddbe2009-11-08 10:16:43 +00002
3// PR5426 - the non-dependent obj would be fully processed and wrapped in a
4// CXXConstructExpr at definition time, which would lead to a failure at
5// instantiation time.
6struct arg {
7 arg();
8};
9
10struct oldstylemove {
11 oldstylemove(oldstylemove&);
12 oldstylemove(const arg&);
13};
14
15template <typename T>
16void fn(T t, const arg& arg) {
17 oldstylemove obj(arg);
18}
19
20void test() {
21 fn(1, arg());
22}