[libcxx] r273034 - Add Filesystem TS -- Complete
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 18 12:03:25 PDT 2016
> I assume the correct way to fix this is to disable
-Wcovered-switch-default while compiling libcxx/src/experimental/
filesystem/operations.cpp
Agreed. Disabled in r273092.
Thanks for your patience with this latest change,
/Eric
On Sat, Jun 18, 2016 at 12:54 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Hello Eric,
>
> this commit causes new warnings on our bots:
>
> clang/src/projects/libcxx/include/fstream:816:5: warning: default label in
> switch which covers all enumeration values [-Wcovered-switch-default]
> default:
>
> The problem is with this defensive default statement in fstream:
>
>
> template <class _CharT, class _Traits>
> 0792 typename basic_filebuf<_CharT, _Traits>::pos_type
> 0793 basic_filebuf<_CharT, _Traits>::seekoff(off_type __off,
> ios_base::seekdir __way,
> 0794 ios_base::openmode)
> 0795 {
> 0796 #ifndef _LIBCPP_NO_EXCEPTIONS
> 0797 if (!__cv_)
> 0798 throw bad_cast();
> 0799 #endif
> 0800 int __width = __cv_->encoding();
> 0801 if (__file_ == 0 || (__width <= 0 && __off != 0) || sync())
> 0802 return pos_type(off_type(-1));
> 0803 // __width > 0 || __off == 0
> 0804 int __whence;
> 0805 switch (__way)
> 0806 {
> 0807 case ios_base::beg:
> 0808 __whence = SEEK_SET;
> 0809 break;
> 0810 case ios_base::cur:
> 0811 __whence = SEEK_CUR;
> 0812 break;
> 0813 case ios_base::end:
> 0814 __whence = SEEK_END;
> 0815 break;
> 0816 default:
> 0817 return pos_type(off_type(-1));
> 0818 }
>
>
> I assume the correct way to fix this is to disable
> -Wcovered-switch-default while compiling
> libcxx/src/experimental/filesystem/operations.cpp
>
> Could you please investigate?
>
> thanks,
> Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160618/143ddbf3/attachment.html>
More information about the cfe-commits
mailing list