[PATCH] D19621: [libc++] Rename function parameters to avoid shadowing.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 14:28:02 PDT 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: mclow.lists, EricWF.
STL_MSFT added a subscriber: cfe-commits.

[libc++] Rename function parameters to avoid shadowing.

Fixes MSVC "warning C4459: declaration of 'meow' hides global declaration".

http://reviews.llvm.org/D19621

Files:
  test/std/thread/futures/futures.async/async.pass.cpp

Index: test/std/thread/futures/futures.async/async.pass.cpp
===================================================================
--- test/std/thread/futures/futures.async/async.pass.cpp
+++ test/std/thread/futures/futures.async/async.pass.cpp
@@ -47,22 +47,22 @@
     std::this_thread::sleep_for(ms(200));
 }
 
-std::unique_ptr<int> f3(int i)
+std::unique_ptr<int> f3(int j)
 {
     std::this_thread::sleep_for(ms(200));
-    return std::unique_ptr<int>(new int(i));
+    return std::unique_ptr<int>(new int(j));
 }
 
 std::unique_ptr<int> f4(std::unique_ptr<int>&& p)
 {
     std::this_thread::sleep_for(ms(200));
     return std::move(p);
 }
 
-void f5(int i)
+void f5(int j)
 {
     std::this_thread::sleep_for(ms(200));
-    throw i;
+    throw j;
 }
 
 int main()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19621.55316.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160427/559179a0/attachment.bin>


More information about the cfe-commits mailing list