Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-09-20 Thread Alex L via cfe-commits
On 16 August 2017 at 02:49, Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> Author: rsmith
> Date: Tue Aug 15 18:49:53 2017
> New Revision: 310983
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310983=rev
> Log:
> PR19668, PR23034: Fix handling of move constructors and deleted copy
> constructors when deciding whether classes should be passed indirectly.
>
> This fixes ABI differences between Clang and GCC:
>
>  * Previously, Clang ignored the move constructor when making this
>determination. It now takes the move constructor into account, per
>https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
>seem recent, but the ABI change was agreed on the Itanium C++ ABI
>list a long time ago).
>
>  * Previously, Clang's behavior when the copy constructor was deleted
>was unstable -- depending on whether the lazy declaration of the
>copy constructor had been triggered, you might get different behavior.
>We now eagerly declare the copy constructor whenever its deletedness
>is unclear, and ignore deleted copy/move constructors when looking for
>a trivial such constructor.
>
> This also fixes an ABI difference between Clang and MSVC:
>
>  * If the copy constructor would be implicitly deleted (but has not been
>lazily declared yet), for instance because the class has an rvalue
>reference member, we would pass it directly. We now pass such a class
>indirectly, matching MSVC.
>
> Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
> Schmidt, which was based on a patch by Reid Kleckner!
>
> This is a re-commit of r310401, which was reverted in r310464 due to ARM
> failures (which should now be fixed).
>
> Modified:
> cfe/trunk/include/clang/AST/DeclCXX.h
> cfe/trunk/lib/AST/ASTImporter.cpp
> cfe/trunk/lib/AST/DeclCXX.cpp
> cfe/trunk/lib/CodeGen/CGCXXABI.cpp
> cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
> cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
> cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
> cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
>
> Modified: cfe/trunk/include/clang/AST/DeclCXX.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/AST/DeclCXX.h?rev=310983=310982=310983=diff
> 
> ==
> --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
> +++ cfe/trunk/include/clang/AST/DeclCXX.h Tue Aug 15 18:49:53 2017
> @@ -374,6 +374,7 @@ class CXXRecordDecl : public RecordDecl
>  /// \brief These flags are \c true if a defaulted corresponding
> special
>  /// member can't be fully analyzed without performing overload
> resolution.
>  /// @{
> +unsigned NeedOverloadResolutionForCopyConstructor : 1;
>  unsigned NeedOverloadResolutionForMoveConstructor : 1;
>  unsigned NeedOverloadResolutionForMoveAssignment : 1;
>  unsigned NeedOverloadResolutionForDestructor : 1;
> @@ -382,6 +383,7 @@ class CXXRecordDecl : public RecordDecl
>  /// \brief These flags are \c true if an implicit defaulted
> corresponding
>  /// special member would be defined as deleted.
>  /// @{
> +unsigned DefaultedCopyConstructorIsDeleted : 1;
>  unsigned DefaultedMoveConstructorIsDeleted : 1;
>  unsigned DefaultedMoveAssignmentIsDeleted : 1;
>  unsigned DefaultedDestructorIsDeleted : 1;
> @@ -414,6 +416,12 @@ class CXXRecordDecl : public RecordDecl
>  /// constructor.
>  unsigned HasDefaultedDefaultConstructor : 1;
>
> +/// \brief True if this class can be passed in a
> non-address-preserving
> +/// fashion (such as in registers) according to the C++ language
> rules.
> +/// This does not imply anything about how the ABI in use will
> actually
> +/// pass an object of this class.
> +unsigned CanPassInRegisters : 1;
> +
>  /// \brief True if a defaulted default constructor for this class
> would
>  /// be constexpr.
>  unsigned DefaultedDefaultConstructorIsConstexpr : 1;
> @@ -810,18 +818,50 @@ public:
>  return data().FirstFriend.isValid();
>}
>
> +  /// \brief \c true if a defaulted copy constructor for this class would
> be
> +  /// deleted.
> +  bool defaultedCopyConstructorIsDeleted() const {
> +assert((!needsOverloadResolutionForCopyConstructor() ||
> +(data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
> +   "this property has not yet been computed by Sema");
> +return data().DefaultedCopyConstructorIsDeleted;
> +  }
> +
> +  /// \brief \c true if a defaulted move constructor for this class would
> be
> +  /// deleted.
> +  bool defaultedMoveConstructorIsDeleted() const {
> +assert((!needsOverloadResolutionForMoveConstructor() ||
> +(data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
> +   "this property 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-09-19 Thread Malcolm Parsons via cfe-commits
On 16 August 2017 at 02:49, Richard Smith via cfe-commits
 wrote:

> +  /// \brief \c true if a defaulted destructor for this class would be 
> deleted.
> +  bool defaultedDestructorIsDeleted() const {
> +return !data().DefaultedDestructorIsDeleted;
> +  }

Is the ! intentional?

-- 
Malcolm Parsons
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-21 Thread Hans Wennborg via cfe-commits
Clean merge in r311410. Thanks.

On Mon, Aug 21, 2017 at 4:21 PM, Richard Smith  wrote:
> Yes, I'd very much like to get this into the upcoming release.
>
> On 21 August 2017 at 16:16, Hans Wennborg  wrote:
>>
>> PR19668 was marked as a release blocker. Is this suitable for merging?
>>
>> On Tue, Aug 15, 2017 at 6:49 PM, Richard Smith via cfe-commits
>>  wrote:
>> > Author: rsmith
>> > Date: Tue Aug 15 18:49:53 2017
>> > New Revision: 310983
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=310983=rev
>> > Log:
>> > PR19668, PR23034: Fix handling of move constructors and deleted copy
>> > constructors when deciding whether classes should be passed indirectly.
>> >
>> > This fixes ABI differences between Clang and GCC:
>> >
>> >  * Previously, Clang ignored the move constructor when making this
>> >determination. It now takes the move constructor into account, per
>> >https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
>> >seem recent, but the ABI change was agreed on the Itanium C++ ABI
>> >list a long time ago).
>> >
>> >  * Previously, Clang's behavior when the copy constructor was deleted
>> >was unstable -- depending on whether the lazy declaration of the
>> >copy constructor had been triggered, you might get different
>> > behavior.
>> >We now eagerly declare the copy constructor whenever its deletedness
>> >is unclear, and ignore deleted copy/move constructors when looking
>> > for
>> >a trivial such constructor.
>> >
>> > This also fixes an ABI difference between Clang and MSVC:
>> >
>> >  * If the copy constructor would be implicitly deleted (but has not been
>> >lazily declared yet), for instance because the class has an rvalue
>> >reference member, we would pass it directly. We now pass such a class
>> >indirectly, matching MSVC.
>> >
>> > Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
>> > Schmidt, which was based on a patch by Reid Kleckner!
>> >
>> > This is a re-commit of r310401, which was reverted in r310464 due to ARM
>> > failures (which should now be fixed).
>> >
>> > Modified:
>> > cfe/trunk/include/clang/AST/DeclCXX.h
>> > cfe/trunk/lib/AST/ASTImporter.cpp
>> > cfe/trunk/lib/AST/DeclCXX.cpp
>> > cfe/trunk/lib/CodeGen/CGCXXABI.cpp
>> > cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
>> > cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
>> > cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>> > cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
>> > cfe/trunk/lib/Serialization/ASTWriter.cpp
>> > cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
>> > cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
>> >
>> > Modified: cfe/trunk/include/clang/AST/DeclCXX.h
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=310983=310982=310983=diff
>> >
>> > ==
>> > --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
>> > +++ cfe/trunk/include/clang/AST/DeclCXX.h Tue Aug 15 18:49:53 2017
>> > @@ -374,6 +374,7 @@ class CXXRecordDecl : public RecordDecl
>> >  /// \brief These flags are \c true if a defaulted corresponding
>> > special
>> >  /// member can't be fully analyzed without performing overload
>> > resolution.
>> >  /// @{
>> > +unsigned NeedOverloadResolutionForCopyConstructor : 1;
>> >  unsigned NeedOverloadResolutionForMoveConstructor : 1;
>> >  unsigned NeedOverloadResolutionForMoveAssignment : 1;
>> >  unsigned NeedOverloadResolutionForDestructor : 1;
>> > @@ -382,6 +383,7 @@ class CXXRecordDecl : public RecordDecl
>> >  /// \brief These flags are \c true if an implicit defaulted
>> > corresponding
>> >  /// special member would be defined as deleted.
>> >  /// @{
>> > +unsigned DefaultedCopyConstructorIsDeleted : 1;
>> >  unsigned DefaultedMoveConstructorIsDeleted : 1;
>> >  unsigned DefaultedMoveAssignmentIsDeleted : 1;
>> >  unsigned DefaultedDestructorIsDeleted : 1;
>> > @@ -414,6 +416,12 @@ class CXXRecordDecl : public RecordDecl
>> >  /// constructor.
>> >  unsigned HasDefaultedDefaultConstructor : 1;
>> >
>> > +/// \brief True if this class can be passed in a
>> > non-address-preserving
>> > +/// fashion (such as in registers) according to the C++ language
>> > rules.
>> > +/// This does not imply anything about how the ABI in use will
>> > actually
>> > +/// pass an object of this class.
>> > +unsigned CanPassInRegisters : 1;
>> > +
>> >  /// \brief True if a defaulted default constructor for this class
>> > would
>> >  /// be constexpr.
>> >  unsigned DefaultedDefaultConstructorIsConstexpr : 1;
>> > @@ -810,18 +818,50 @@ public:
>> >  return data().FirstFriend.isValid();
>> >}
>> >
>> > +  /// \brief \c true if a defaulted copy constructor for this class
>> > would be
>> > +  /// 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-21 Thread Richard Smith via cfe-commits
Yes, I'd very much like to get this into the upcoming release.

On 21 August 2017 at 16:16, Hans Wennborg  wrote:

> PR19668 was marked as a release blocker. Is this suitable for merging?
>
> On Tue, Aug 15, 2017 at 6:49 PM, Richard Smith via cfe-commits
>  wrote:
> > Author: rsmith
> > Date: Tue Aug 15 18:49:53 2017
> > New Revision: 310983
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=310983=rev
> > Log:
> > PR19668, PR23034: Fix handling of move constructors and deleted copy
> > constructors when deciding whether classes should be passed indirectly.
> >
> > This fixes ABI differences between Clang and GCC:
> >
> >  * Previously, Clang ignored the move constructor when making this
> >determination. It now takes the move constructor into account, per
> >https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
> >seem recent, but the ABI change was agreed on the Itanium C++ ABI
> >list a long time ago).
> >
> >  * Previously, Clang's behavior when the copy constructor was deleted
> >was unstable -- depending on whether the lazy declaration of the
> >copy constructor had been triggered, you might get different behavior.
> >We now eagerly declare the copy constructor whenever its deletedness
> >is unclear, and ignore deleted copy/move constructors when looking for
> >a trivial such constructor.
> >
> > This also fixes an ABI difference between Clang and MSVC:
> >
> >  * If the copy constructor would be implicitly deleted (but has not been
> >lazily declared yet), for instance because the class has an rvalue
> >reference member, we would pass it directly. We now pass such a class
> >indirectly, matching MSVC.
> >
> > Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
> > Schmidt, which was based on a patch by Reid Kleckner!
> >
> > This is a re-commit of r310401, which was reverted in r310464 due to ARM
> > failures (which should now be fixed).
> >
> > Modified:
> > cfe/trunk/include/clang/AST/DeclCXX.h
> > cfe/trunk/lib/AST/ASTImporter.cpp
> > cfe/trunk/lib/AST/DeclCXX.cpp
> > cfe/trunk/lib/CodeGen/CGCXXABI.cpp
> > cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
> > cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
> > cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> > cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
> > cfe/trunk/lib/Serialization/ASTWriter.cpp
> > cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
> > cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
> >
> > Modified: cfe/trunk/include/clang/AST/DeclCXX.h
> > URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/
> clang/AST/DeclCXX.h?rev=310983=310982=310983=diff
> > 
> ==
> > --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
> > +++ cfe/trunk/include/clang/AST/DeclCXX.h Tue Aug 15 18:49:53 2017
> > @@ -374,6 +374,7 @@ class CXXRecordDecl : public RecordDecl
> >  /// \brief These flags are \c true if a defaulted corresponding
> special
> >  /// member can't be fully analyzed without performing overload
> resolution.
> >  /// @{
> > +unsigned NeedOverloadResolutionForCopyConstructor : 1;
> >  unsigned NeedOverloadResolutionForMoveConstructor : 1;
> >  unsigned NeedOverloadResolutionForMoveAssignment : 1;
> >  unsigned NeedOverloadResolutionForDestructor : 1;
> > @@ -382,6 +383,7 @@ class CXXRecordDecl : public RecordDecl
> >  /// \brief These flags are \c true if an implicit defaulted
> corresponding
> >  /// special member would be defined as deleted.
> >  /// @{
> > +unsigned DefaultedCopyConstructorIsDeleted : 1;
> >  unsigned DefaultedMoveConstructorIsDeleted : 1;
> >  unsigned DefaultedMoveAssignmentIsDeleted : 1;
> >  unsigned DefaultedDestructorIsDeleted : 1;
> > @@ -414,6 +416,12 @@ class CXXRecordDecl : public RecordDecl
> >  /// constructor.
> >  unsigned HasDefaultedDefaultConstructor : 1;
> >
> > +/// \brief True if this class can be passed in a
> non-address-preserving
> > +/// fashion (such as in registers) according to the C++ language
> rules.
> > +/// This does not imply anything about how the ABI in use will
> actually
> > +/// pass an object of this class.
> > +unsigned CanPassInRegisters : 1;
> > +
> >  /// \brief True if a defaulted default constructor for this class
> would
> >  /// be constexpr.
> >  unsigned DefaultedDefaultConstructorIsConstexpr : 1;
> > @@ -810,18 +818,50 @@ public:
> >  return data().FirstFriend.isValid();
> >}
> >
> > +  /// \brief \c true if a defaulted copy constructor for this class
> would be
> > +  /// deleted.
> > +  bool defaultedCopyConstructorIsDeleted() const {
> > +assert((!needsOverloadResolutionForCopyConstructor() ||
> > +(data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
> > +   "this property has not yet been 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-21 Thread Hans Wennborg via cfe-commits
PR19668 was marked as a release blocker. Is this suitable for merging?

On Tue, Aug 15, 2017 at 6:49 PM, Richard Smith via cfe-commits
 wrote:
> Author: rsmith
> Date: Tue Aug 15 18:49:53 2017
> New Revision: 310983
>
> URL: http://llvm.org/viewvc/llvm-project?rev=310983=rev
> Log:
> PR19668, PR23034: Fix handling of move constructors and deleted copy
> constructors when deciding whether classes should be passed indirectly.
>
> This fixes ABI differences between Clang and GCC:
>
>  * Previously, Clang ignored the move constructor when making this
>determination. It now takes the move constructor into account, per
>https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may
>seem recent, but the ABI change was agreed on the Itanium C++ ABI
>list a long time ago).
>
>  * Previously, Clang's behavior when the copy constructor was deleted
>was unstable -- depending on whether the lazy declaration of the
>copy constructor had been triggered, you might get different behavior.
>We now eagerly declare the copy constructor whenever its deletedness
>is unclear, and ignore deleted copy/move constructors when looking for
>a trivial such constructor.
>
> This also fixes an ABI difference between Clang and MSVC:
>
>  * If the copy constructor would be implicitly deleted (but has not been
>lazily declared yet), for instance because the class has an rvalue
>reference member, we would pass it directly. We now pass such a class
>indirectly, matching MSVC.
>
> Based on a patch by Vassil Vassilev, which was based on a patch by Bernd
> Schmidt, which was based on a patch by Reid Kleckner!
>
> This is a re-commit of r310401, which was reverted in r310464 due to ARM
> failures (which should now be fixed).
>
> Modified:
> cfe/trunk/include/clang/AST/DeclCXX.h
> cfe/trunk/lib/AST/ASTImporter.cpp
> cfe/trunk/lib/AST/DeclCXX.cpp
> cfe/trunk/lib/CodeGen/CGCXXABI.cpp
> cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
> cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
> cfe/trunk/lib/Sema/SemaDeclCXX.cpp
> cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
> cfe/trunk/lib/Serialization/ASTWriter.cpp
> cfe/trunk/test/CodeGenCXX/uncopyable-args.cpp
> cfe/trunk/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
>
> Modified: cfe/trunk/include/clang/AST/DeclCXX.h
> URL: 
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=310983=310982=310983=diff
> ==
> --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
> +++ cfe/trunk/include/clang/AST/DeclCXX.h Tue Aug 15 18:49:53 2017
> @@ -374,6 +374,7 @@ class CXXRecordDecl : public RecordDecl
>  /// \brief These flags are \c true if a defaulted corresponding special
>  /// member can't be fully analyzed without performing overload 
> resolution.
>  /// @{
> +unsigned NeedOverloadResolutionForCopyConstructor : 1;
>  unsigned NeedOverloadResolutionForMoveConstructor : 1;
>  unsigned NeedOverloadResolutionForMoveAssignment : 1;
>  unsigned NeedOverloadResolutionForDestructor : 1;
> @@ -382,6 +383,7 @@ class CXXRecordDecl : public RecordDecl
>  /// \brief These flags are \c true if an implicit defaulted corresponding
>  /// special member would be defined as deleted.
>  /// @{
> +unsigned DefaultedCopyConstructorIsDeleted : 1;
>  unsigned DefaultedMoveConstructorIsDeleted : 1;
>  unsigned DefaultedMoveAssignmentIsDeleted : 1;
>  unsigned DefaultedDestructorIsDeleted : 1;
> @@ -414,6 +416,12 @@ class CXXRecordDecl : public RecordDecl
>  /// constructor.
>  unsigned HasDefaultedDefaultConstructor : 1;
>
> +/// \brief True if this class can be passed in a non-address-preserving
> +/// fashion (such as in registers) according to the C++ language rules.
> +/// This does not imply anything about how the ABI in use will actually
> +/// pass an object of this class.
> +unsigned CanPassInRegisters : 1;
> +
>  /// \brief True if a defaulted default constructor for this class would
>  /// be constexpr.
>  unsigned DefaultedDefaultConstructorIsConstexpr : 1;
> @@ -810,18 +818,50 @@ public:
>  return data().FirstFriend.isValid();
>}
>
> +  /// \brief \c true if a defaulted copy constructor for this class would be
> +  /// deleted.
> +  bool defaultedCopyConstructorIsDeleted() const {
> +assert((!needsOverloadResolutionForCopyConstructor() ||
> +(data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
> +   "this property has not yet been computed by Sema");
> +return data().DefaultedCopyConstructorIsDeleted;
> +  }
> +
> +  /// \brief \c true if a defaulted move constructor for this class would be
> +  /// deleted.
> +  bool defaultedMoveConstructorIsDeleted() const {
> +assert((!needsOverloadResolutionForMoveConstructor() ||
> +(data().DeclaredSpecialMembers 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-17 Thread Petr Hosek via cfe-commits
Thanks for a quick response, "#include " indeed helped.

On Thu, Aug 17, 2017 at 5:41 PM Richard Smith  wrote:

> On 17 August 2017 at 17:28, Petr Hosek via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> We're seeing a build failure in WebKit which appears to be have been
>> introduced by this change:
>>
>> ../../buildtools/linux-x64/clang/bin/clang++ -MD -MF
>> obj/apps/web_view/web_view_test.test_webview.o.d
>> -DTOOLCHAIN_VERSION=4e89c701396412a50a901115ab4a2a09145f3777
>> -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DCAIRO_HAS_FC_FONT=0
>> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION
>> -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen
>> -I../../third_party/webkit/Source/WebKit/fuchsia
>> -I../../third_party/boringssl/include -Igen/third_party/cairo
>> -I../../third_party/curl/include -Iobj/third_party/curl
>> -Iobj/third_party/curl/curl -I../../third_party/freetype2/include
>> -I../../third_party/harfbuzz/src -I../../third_party/icu/source/common
>> -I../../third_party/icu/source/i18n -I../../third_party/libjpeg-turbo
>> -I../../third_party/libpng -I../../third_party/zlib
>> -I../../third_party/libxml2/include -I../../third_party/sqlite -g
>> --sysroot=/usr/local/google/home/phosek/fuchsia/out/build-magenta/build-magenta-pc-x86-64/sysroot
>> --target=x86_64-fuchsia -no-canonical-prefixes
>> -fdebug-prefix-map=/usr/local/google/home/phosek/fuchsia=. -Wall -Wextra
>> -Wno-unused-parameter -Wno-enum-compare-switch -Wno-unused-lambda-capture
>> -Wno-user-defined-warnings -fvisibility=hidden -g -Og -fsanitize=safe-stack
>> -fstack-protector-strong -Werror -Wno-error=deprecated-declarations
>> -fvisibility-inlines-hidden -std=c++14 -fno-exceptions -fno-rtti
>> -Wthread-safety -c ../../apps/web_view/test_webview.cpp -o
>> obj/apps/web_view/web_view_test.test_webview.o
>> In file included from ../../apps/web_view/test_webview.cpp:1:
>> In file included from
>> ../../third_party/webkit/Source/WebKit/fuchsia/WebView.h:28:
>> In file included from
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:484:
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/type_traits:4323:23:
>> error: implicit instantiation of undefined template
>> 'std::__2::basic_string> std::__2::allocator >'
>>
>> _LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...))
>>   ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/__config:468:15:
>> note: expanded from macro '_VSTD'
>> #define _VSTD std::_LIBCPP_NAMESPACE
>>   ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/type_traits:4340:9:
>> note: in instantiation of exception specification for
>> '__invoke> std::__2::char_traits, std::__2::allocator > (const
>> std::__2::basic_string> std::__2::allocator > &)> &, const std::__2::basic_string> std::__2::char_traits, std::__2::allocator > &>' requested here
>> _VSTD::__invoke(_VSTD::declval<_Fp>(),
>> _VSTD::declval<_Args>()...));
>> ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/__config:468:15:
>> note: expanded from macro '_VSTD'
>> #define _VSTD std::_LIBCPP_NAMESPACE
>>   ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1601:33:
>> note: in instantiation of template class 'std::__2::__invokable_r> std::__2::function> std::__2::char_traits, std::__2::allocator > (const
>> std::__2::basic_string> std::__2::allocator > &)> &, const std::__2::basic_string> std::__2::char_traits, std::__2::allocator > &>' requested here
>> __invokable<_Fp&, _ArgTypes...>::value>
>> ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1626:9:
>> note: in instantiation of default argument for
>> '__callable> std::__2::char_traits, std::__2::allocator > (const
>> std::__2::basic_string> std::__2::allocator > &)> >' required here
>> __callable<_Fp>::value && !is_same<_Fp, function>::value
>> ^~~
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1628:5:
>> note: in instantiation of default argument for
>> 'function> std::__2::char_traits, std::__2::allocator > (const
>> std::__2::basic_string> std::__2::allocator > &)> >' required here
>> function(_Fp);
>> ^
>> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1588:28:
>> note: while substituting deduced template arguments into function template
>> 'function' [with _Fp 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-17 Thread Richard Smith via cfe-commits
On 17 August 2017 at 17:28, Petr Hosek via cfe-commits <
cfe-commits@lists.llvm.org> wrote:

> We're seeing a build failure in WebKit which appears to be have been
> introduced by this change:
>
> ../../buildtools/linux-x64/clang/bin/clang++ -MD -MF
> obj/apps/web_view/web_view_test.test_webview.o.d -DTOOLCHAIN_VERSION=
> 4e89c701396412a50a901115ab4a2a09145f3777 
> -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
> -DCAIRO_HAS_FC_FONT=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0
> -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../..
> -Igen -I../../third_party/webkit/Source/WebKit/fuchsia
> -I../../third_party/boringssl/include -Igen/third_party/cairo
> -I../../third_party/curl/include -Iobj/third_party/curl
> -Iobj/third_party/curl/curl -I../../third_party/freetype2/include
> -I../../third_party/harfbuzz/src -I../../third_party/icu/source/common
> -I../../third_party/icu/source/i18n -I../../third_party/libjpeg-turbo
> -I../../third_party/libpng -I../../third_party/zlib
> -I../../third_party/libxml2/include -I../../third_party/sqlite -g
> --sysroot=/usr/local/google/home/phosek/fuchsia/out/build-
> magenta/build-magenta-pc-x86-64/sysroot --target=x86_64-fuchsia
> -no-canonical-prefixes 
> -fdebug-prefix-map=/usr/local/google/home/phosek/fuchsia=.
> -Wall -Wextra -Wno-unused-parameter -Wno-enum-compare-switch
> -Wno-unused-lambda-capture -Wno-user-defined-warnings -fvisibility=hidden
> -g -Og -fsanitize=safe-stack -fstack-protector-strong -Werror
> -Wno-error=deprecated-declarations -fvisibility-inlines-hidden -std=c++14
> -fno-exceptions -fno-rtti -Wthread-safety -c 
> ../../apps/web_view/test_webview.cpp
> -o obj/apps/web_view/web_view_test.test_webview.o
> In file included from ../../apps/web_view/test_webview.cpp:1:
> In file included from ../../third_party/webkit/
> Source/WebKit/fuchsia/WebView.h:28:
> In file included from ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/functional:484:
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/type_traits:4323:23: error: implicit instantiation of
> undefined template 'std::__2::basic_string std::__2::char_traits, std::__2::allocator >'
> _LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::
> forward<_Args>(__args)...))
>   ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/__config:468:15: note: expanded from macro '_VSTD'
> #define _VSTD std::_LIBCPP_NAMESPACE
>   ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/type_traits:4340:9: note: in instantiation of exception
> specification for '__invoke std::__2::char_traits, std::__2::allocator > (const
> std::__2::basic_string std::__2::allocator > &)> &, const std::__2::basic_string std::__2::char_traits, std::__2::allocator > &>' requested here
> _VSTD::__invoke(_VSTD::declval<_Fp>(),
> _VSTD::declval<_Args>()...));
> ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/__config:468:15: note: expanded from macro '_VSTD'
> #define _VSTD std::_LIBCPP_NAMESPACE
>   ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/functional:1601:33: note: in instantiation of template
> class 'std::__2::__invokable_r std::__2::function std::__2::char_traits, std::__2::allocator > (const
> std::__2::basic_string std::__2::allocator > &)> &, const std::__2::basic_string std::__2::char_traits, std::__2::allocator > &>' requested here
> __invokable<_Fp&, _ArgTypes...>::value>
> ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/functional:1626:9: note: in instantiation of default
> argument for '__callable std::__2::char_traits, std::__2::allocator > (const
> std::__2::basic_string std::__2::allocator > &)> >' required here
> __callable<_Fp>::value && !is_same<_Fp, function>::value
> ^~~
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/functional:1628:5: note: in instantiation of default
> argument for 'function std::__2::char_traits, std::__2::allocator > (const
> std::__2::basic_string std::__2::allocator > &)> >' required here
> function(_Fp);
> ^
> ../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/
> include/c++/v1/functional:1588:28: note: while substituting deduced
> template arguments into function template 'function' [with _Fp =
> std::__2::function std::__2::char_traits, std::__2::allocator > (const
> std::__2::basic_string std::__2::allocator > &)>, $1 = (no 

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-08-17 Thread Petr Hosek via cfe-commits
We're seeing a build failure in WebKit which appears to be have been
introduced by this change:

../../buildtools/linux-x64/clang/bin/clang++ -MD -MF
obj/apps/web_view/web_view_test.test_webview.o.d
-DTOOLCHAIN_VERSION=4e89c701396412a50a901115ab4a2a09145f3777
-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -DCAIRO_HAS_FC_FONT=0
-DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION
-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -I../.. -Igen
-I../../third_party/webkit/Source/WebKit/fuchsia
-I../../third_party/boringssl/include -Igen/third_party/cairo
-I../../third_party/curl/include -Iobj/third_party/curl
-Iobj/third_party/curl/curl -I../../third_party/freetype2/include
-I../../third_party/harfbuzz/src -I../../third_party/icu/source/common
-I../../third_party/icu/source/i18n -I../../third_party/libjpeg-turbo
-I../../third_party/libpng -I../../third_party/zlib
-I../../third_party/libxml2/include -I../../third_party/sqlite -g
--sysroot=/usr/local/google/home/phosek/fuchsia/out/build-magenta/build-magenta-pc-x86-64/sysroot
--target=x86_64-fuchsia -no-canonical-prefixes
-fdebug-prefix-map=/usr/local/google/home/phosek/fuchsia=. -Wall -Wextra
-Wno-unused-parameter -Wno-enum-compare-switch -Wno-unused-lambda-capture
-Wno-user-defined-warnings -fvisibility=hidden -g -Og -fsanitize=safe-stack
-fstack-protector-strong -Werror -Wno-error=deprecated-declarations
-fvisibility-inlines-hidden -std=c++14 -fno-exceptions -fno-rtti
-Wthread-safety -c ../../apps/web_view/test_webview.cpp -o
obj/apps/web_view/web_view_test.test_webview.o
In file included from ../../apps/web_view/test_webview.cpp:1:
In file included from
../../third_party/webkit/Source/WebKit/fuchsia/WebView.h:28:
In file included from
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:484:
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/type_traits:4323:23:
error: implicit instantiation of undefined template
'std::__2::basic_string'
_LIBCPP_INVOKE_RETURN(_VSTD::forward<_Fp>(__f)(_VSTD::forward<_Args>(__args)...))
  ^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/__config:468:15:
note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
  ^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/type_traits:4340:9:
note: in instantiation of exception specification for
'__invoke (const
std::__2::basic_string &)> &, const std::__2::basic_string &>' requested here
_VSTD::__invoke(_VSTD::declval<_Fp>(), _VSTD::declval<_Args>()...));
^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/__config:468:15:
note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_NAMESPACE
  ^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1601:33:
note: in instantiation of template class 'std::__2::__invokable_r (const
std::__2::basic_string &)> &, const std::__2::basic_string &>' requested here
__invokable<_Fp&, _ArgTypes...>::value>
^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1626:9:
note: in instantiation of default argument for
'__callable (const
std::__2::basic_string &)> >' required here
__callable<_Fp>::value && !is_same<_Fp, function>::value
^~~
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1628:5:
note: in instantiation of default argument for
'function (const
std::__2::basic_string &)> >' required here
function(_Fp);
^
../../buildtools/linux-x64/clang/lib/x86_64-fuchsia/include/c++/v1/functional:1588:28:
note: while substituting deduced template arguments into function template
'function' [with _Fp = std::__2::function (const
std::__2::basic_string &)>, $1 = (no value)]
class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
   ^
../../third_party/webkit/Source/WebKit/fuchsia/WebView.h:48:7: note: while
declaring the implicit copy constructor for 'WebView'
class WebView {
  ^