From: Eric Fiselier Date: Sat, 3 Dec 2016 01:21:40 +0000 (+0000) Subject: Fix -Wshadow warnings and enable warnings by default for C++ >= 11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=572e6deeb7b1c13c58ac3e9861669d6b3374d9f7;p=platform%2Fupstream%2Fllvm.git Fix -Wshadow warnings and enable warnings by default for C++ >= 11 llvm-svn: 288564 --- diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list index f344d2e..a75d6e9 100644 --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -876,8 +876,9 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n) #if _LIBCPP_STD_VER > 11 template -forward_list<_Tp, _Alloc>::forward_list(size_type __n, const allocator_type& __a) - : base ( __a ) +forward_list<_Tp, _Alloc>::forward_list(size_type __n, + const allocator_type& __base_alloc) + : base ( __base_alloc ) { if (__n > 0) { diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 4a2c1d7..df99871 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -634,7 +634,11 @@ class Configuration(object): self.cxx.compile_flags += ['-D_LIBCPP_DEBUG=%s' % debug_level] def configure_warnings(self): - enable_warnings = self.get_lit_bool('enable_warnings', False) + default_enable_warnings = len( + self.config.available_features.intersection( + ['c++11', 'c++14', 'c++1z'])) != 0 + enable_warnings = self.get_lit_bool('enable_warnings', + default_enable_warnings) if enable_warnings: self.cxx.warning_flags += [ '-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER',