Author: marshall Date: Wed Aug 2 13:29:26 2017 New Revision: 309881 URL: http://llvm.org/viewvc/llvm-project?rev=309881&view=rev Log: Rename a couple variables to eliminate a shadow warning. No functionality change
Modified: libcxx/trunk/src/experimental/filesystem/operations.cpp Modified: libcxx/trunk/src/experimental/filesystem/operations.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/experimental/filesystem/operations.cpp?rev=309881&r1=309880&r2=309881&view=diff ============================================================================== --- libcxx/trunk/src/experimental/filesystem/operations.cpp (original) +++ libcxx/trunk/src/experimental/filesystem/operations.cpp Wed Aug 2 13:29:26 2017 @@ -182,20 +182,20 @@ void __copy(const path& from, const path const bool sym_status2 = bool(options & copy_options::copy_symlinks); - std::error_code m_ec; + std::error_code m_ec1; struct ::stat f_st = {}; const file_status f = sym_status || sym_status2 - ? detail::posix_lstat(from, f_st, &m_ec) - : detail::posix_stat(from, f_st, &m_ec); - if (m_ec) - return set_or_throw(m_ec, ec, "copy", from, to); + ? detail::posix_lstat(from, f_st, &m_ec1) + : detail::posix_stat(from, f_st, &m_ec1); + if (m_ec1) + return set_or_throw(m_ec1, ec, "copy", from, to); struct ::stat t_st = {}; - const file_status t = sym_status ? detail::posix_lstat(to, t_st, &m_ec) - : detail::posix_stat(to, t_st, &m_ec); + const file_status t = sym_status ? detail::posix_lstat(to, t_st, &m_ec1) + : detail::posix_stat(to, t_st, &m_ec1); if (not status_known(t)) - return set_or_throw(m_ec, ec, "copy", from, to); + return set_or_throw(m_ec1, ec, "copy", from, to); if (!exists(f) || is_other(f) || is_other(t) || (is_directory(f) && is_regular_file(t)) @@ -249,9 +249,9 @@ void __copy(const path& from, const path directory_iterator it = ec ? directory_iterator(from, *ec) : directory_iterator(from); if (ec && *ec) { return; } - std::error_code m_ec; - for (; it != directory_iterator(); it.increment(m_ec)) { - if (m_ec) return set_or_throw(m_ec, ec, "copy", from, to); + std::error_code m_ec2; + for (; it != directory_iterator(); it.increment(m_ec2)) { + if (m_ec2) return set_or_throw(m_ec2, ec, "copy", from, to); __copy(it->path(), to / it->path().filename(), options | copy_options::__in_recursive_copy, ec); if (ec && *ec) { return; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits