diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-10-07 22:10:35 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-10-07 22:10:35 +0000 |
commit | 609e669e1afd91a00260aad5f4ba5230e75161e3 (patch) | |
tree | c9e1f90924ef03a63f9127603df7d269dbaa3b25 /libcxx/test | |
parent | 3f25658143b0b9eadc31f2213d845e9d075511ca (diff) | |
download | bcm5719-llvm-609e669e1afd91a00260aad5f4ba5230e75161e3.tar.gz bcm5719-llvm-609e669e1afd91a00260aad5f4ba5230e75161e3.zip |
Fix shadow warnings. Patch from STL@microsoft.com
llvm-svn: 283618
Diffstat (limited to 'libcxx/test')
-rw-r--r-- | libcxx/test/std/utilities/utility/forward/move.pass.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libcxx/test/std/utilities/utility/forward/move.pass.cpp b/libcxx/test/std/utilities/utility/forward/move.pass.cpp index 9dfebcc5cc2..e2edc2a2afa 100644 --- a/libcxx/test/std/utilities/utility/forward/move.pass.cpp +++ b/libcxx/test/std/utilities/utility/forward/move.pass.cpp @@ -52,12 +52,12 @@ struct A { constexpr bool test_constexpr_move() { #if TEST_STD_VER > 11 - int x = 42; - const int cx = x; - return std::move(x) == 42 - && std::move(cx) == 42 - && std::move(static_cast<int&&>(x)) == 42 - && std::move(static_cast<int const&&>(x)) == 42; + int y = 42; + const int cy = y; + return std::move(y) == 42 + && std::move(cy) == 42 + && std::move(static_cast<int&&>(y)) == 42 + && std::move(static_cast<int const&&>(y)) == 42; #else return true; #endif @@ -105,8 +105,8 @@ int main() } #if TEST_STD_VER > 11 { - constexpr int x = 42; - static_assert(std::move(x) == 42, ""); + constexpr int y = 42; + static_assert(std::move(y) == 42, ""); static_assert(test_constexpr_move(), ""); } #endif @@ -114,8 +114,8 @@ int main() // Test that std::forward is constexpr in C++11. This is an extension // provided by both libc++ and libstdc++. { - constexpr int x = 42; - static_assert(std::move(x) == 42, ""); + constexpr int y = 42; + static_assert(std::move(y) == 42, ""); } #endif } |