p4-0x.cpp 264 B

123456789101112
  1. // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
  2. // expected-no-diagnostics
  3. struct X { };
  4. struct Y : X { };
  5. void test_lvalue_to_rvalue_drop_cvquals(const X &x, const Y &y, const int &i) {
  6. (void)(X&&)x;
  7. (void)(int&&)i;
  8. (void)(X&&)y;
  9. (void)(Y&&)x;
  10. }