llvm-for-llvmta/tools/clang/test/SemaCXX/cast-lvalue-to-rvalue-refer...

9 lines
170 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
// expected-no-diagnostics
struct S {};
int x;
S&& y1 = (S&&)x;
S&& y2 = reinterpret_cast<S&&>(x);
S& z1 = (S&)x;