Fix building the stl_vector tests with -Wshadow-compatible-local
authorChristopher Dykes <cdykes@fb.com>
Fri, 14 Jul 2017 17:29:54 +0000 (10:29 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Jul 2017 17:35:20 +0000 (10:35 -0700)
Summary: It was shadowing locals.

Reviewed By: yfeldblum

Differential Revision: D5422356

fbshipit-source-id: 91da6fcf0b2ea3821394068e9847976e04f43ca9

folly/test/stl_tests/StlVectorTest.cpp

index f82d741af2422c0fb575bcb8b1b3557fc953087c..257a0e8d811d6911fcc93f834237e18b7b4ad14f 100644 (file)
@@ -1682,8 +1682,8 @@ STL_TEST("23.2.1 Table 96.10-11", copyConstruction,
   ) << "only a shallow copy was made";
 
   if (false) {
-    Vector(ca);
-    Vector u = ca;
+    Vector(ca2);
+    Vector u2 = ca2;
   }
 }
 
@@ -1699,7 +1699,7 @@ STL_TEST("23.2.1 Table 96.12", moveConstruction, is_destructible, a) {
   ASSERT_TRUE(dsa == u);
 
   if (false) {
-    Vector u = move(a);
+    Vector u2 = move(a);
   }
 }