Clang Project

clang_source_code/test/SemaCXX/cast-lvalue-to-rvalue-reference.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
2// expected-no-diagnostics
3
4struct S {};
5int x;
6S&& y1 = (S&&)x;
7S&& y2 = reinterpret_cast<S&&>(x);
8S& z1 = (S&)x;
9