1 // RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
2
3 // If T is an lvalue reference type or an rvalue reference to function
4 // type, the result is an lvalue; if T is an rvalue reference to
5 // object type, the result is an xvalue;
6
7 unsigned int f(int);
8
9 template<typename T> T&& xvalue();
test_classification(char * ptr)10 void test_classification(char *ptr) {
11 int (&fr0)(int) = reinterpret_cast<int (&&)(int)>(f);
12 int &&ir0 = reinterpret_cast<int &&>(*ptr);
13 int &&ir1 = reinterpret_cast<int &&>(0);
14 int &&ir2 = reinterpret_cast<int &&>('a');
15 int &&ir3 = reinterpret_cast<int &&>(xvalue<char>());
16 }
17