LGTM
On 21 Jan 2015 08:25, "Agustín Bergé" <[email protected]> wrote:

> Hi rsmith,
>
> Fix `isTriviallyCopyableType` for arrays. An array of type `T` is
> trivially copyable if `T` is trivially copyable.
>
> http://reviews.llvm.org/D7096
>
> Files:
>   lib/AST/Type.cpp
>   test/SemaCXX/type-traits.cpp
>
> Index: lib/AST/Type.cpp
> ===================================================================
> --- lib/AST/Type.cpp
> +++ lib/AST/Type.cpp
> @@ -1089,7 +1089,7 @@
>
>  bool QualType::isTriviallyCopyableType(ASTContext &Context) const {
>    if ((*this)->isArrayType())
> -    return Context.getBaseElementType(*this).isTrivialType(Context);
> +    return
> Context.getBaseElementType(*this).isTriviallyCopyableType(Context);
>
>    if (Context.getLangOpts().ObjCAutoRefCount) {
>      switch (getObjCLifetime()) {
> Index: test/SemaCXX/type-traits.cpp
> ===================================================================
> --- test/SemaCXX/type-traits.cpp
> +++ test/SemaCXX/type-traits.cpp
> @@ -1857,6 +1857,9 @@
>    { int arr[T(__is_trivially_copyable(HasNonPOD))]; }
>    { int arr[T(__is_trivially_copyable(DerivesHasCons))]; }
>    { int arr[T(__is_trivially_copyable(DerivesHasRef))]; }
> +  { int arr[T(__is_trivially_copyable(NonTrivialDefault))]; }
> +  { int arr[T(__is_trivially_copyable(NonTrivialDefault[]))]; }
> +  { int arr[T(__is_trivially_copyable(NonTrivialDefault[3]))]; }
>
>    { int arr[F(__is_trivially_copyable(HasCopyAssign))]; }
>    { int arr[F(__is_trivially_copyable(HasMoveAssign))]; }
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to