summaryrefslogtreecommitdiffstats
path: root/libcxx/src/experimental/filesystem/operations.cpp
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-08-02 20:29:26 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-08-02 20:29:26 +0000
commitc9da8f0f64671557f8f29af01a32f22878cfdaa9 (patch)
treea46a7a03068bf06535795cf0b05e153846a900f6 /libcxx/src/experimental/filesystem/operations.cpp
parentae9b87d10cb501231a79ba972dd4654b38dc9f93 (diff)
downloadbcm5719-llvm-c9da8f0f64671557f8f29af01a32f22878cfdaa9.tar.gz
bcm5719-llvm-c9da8f0f64671557f8f29af01a32f22878cfdaa9.zip
Rename a couple variables to eliminate a shadow warning. No functionality change
llvm-svn: 309881
Diffstat (limited to 'libcxx/src/experimental/filesystem/operations.cpp')
-rw-r--r--libcxx/src/experimental/filesystem/operations.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/libcxx/src/experimental/filesystem/operations.cpp b/libcxx/src/experimental/filesystem/operations.cpp
index 641a3c53636..1a514545cec 100644
--- a/libcxx/src/experimental/filesystem/operations.cpp
+++ b/libcxx/src/experimental/filesystem/operations.cpp
@@ -182,20 +182,20 @@ void __copy(const path& from, const path& to, copy_options options,
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& to, copy_options options,
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; }
OpenPOWER on IntegriCloud