[PATCH] D54673: Fix some `-Wshadow` diagnostics emitted by Clang trunk
Arthur O'Dwyer via Phabricator
reviews at reviews.llvm.org
Sat Nov 17 18:44:24 PST 2018
Quuxplusone created this revision.
Quuxplusone added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, ldionne.
This is what I see when building `make -j5 check-cxx` with Clang trunk (built from source) on OS X.
In file included from /llvm/projects/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp:22:
/llvm/projects/libcxx/test/support/filesystem_test_helper.hpp:455:62: error: declaration shadows a field of 'ExceptionChecker' [-Werror,-Wshadow]
explicit ExceptionChecker(std::errc first_err, const char* func_name,
^
/llvm/projects/libcxx/test/support/filesystem_test_helper.hpp:452:15: note: previous declaration is here
const char* func_name;
^
In file included from /llvm/projects/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp:17:
/llvm/projects/libcxx/include/charconv:473:35: error: declaration shadows a local variable [-Werror,-Wshadow]
auto __find_non_zero = [](_It __first, _It __last) {
^
/llvm/projects/libcxx/include/charconv:470:30: note: previous declaration is here
__subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
^
The `-Werror,-Wshadow` seems to be coming from here. I don't know why non-Apple platforms don't see these same warnings.
$ git grep Wshadow utils/libcxx/
utils/libcxx/test/config.py: self.cxx.addWarningFlagIfSupported('-Wshadow')
Repository:
rCXX libc++
https://reviews.llvm.org/D54673
Files:
include/charconv
test/support/filesystem_test_helper.hpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54673.174523.patch
Type: text/x-patch
Size: 5021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181118/2f6e32a2/attachment.bin>
More information about the libcxx-commits
mailing list