[PATCH] D20919: [libcxx] [test] Rename b to b2 in order to avoid shadowing between nested catch blocks.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 09:40:39 PDT 2016


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

Rename b to b2 in order to avoid shadowing between nested catch blocks.

Fixes MSVC warning C6246 "Local declaration of 'b' hides declaration of the same name in outer scope."

http://reviews.llvm.org/D20919

Files:
  test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp

Index: test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
===================================================================
--- test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
+++ test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp
@@ -76,9 +76,9 @@
                     std::rethrow_if_nested(a);
                     assert(false);
                 }
-                catch (const B& b)
+                catch (const B& b2)
                 {
-                    assert(b == B(5));
+                    assert(b2 == B(5));
                 }
             }
         }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20919.59403.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160602/907b47eb/attachment.bin>


More information about the cfe-commits mailing list