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));
                 }
             }
         }


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));
                 }
             }
         }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to