case UTT_IsStandardLayout:
case UTT_IsPOD:
case UTT_IsLiteral:
- ArgTy = QualType(ArgTy->getBaseElementTypeUnsafe(), 0);
- LLVM_FALLTHROUGH;
-
- // C++1z [meta.unary.prop]:
- // T shall be a complete type, cv void, or an array of unknown bound.
- case UTT_IsDestructible:
- case UTT_IsNothrowDestructible:
- case UTT_IsTriviallyDestructible:
- // Per the GCC type traits documentation, the same constraints apply to these.
+ // Per the GCC type traits documentation, T shall be a complete type, cv void,
+ // or an array of unknown bound. But GCC actually imposes the same constraints
+ // as above.
case UTT_HasNothrowAssign:
case UTT_HasNothrowMoveAssign:
case UTT_HasNothrowConstructor:
case UTT_HasTrivialCopy:
case UTT_HasTrivialDestructor:
case UTT_HasVirtualDestructor:
+ ArgTy = QualType(ArgTy->getBaseElementTypeUnsafe(), 0);
+ LLVM_FALLTHROUGH;
+
+ // C++1z [meta.unary.prop]:
+ // T shall be a complete type, cv void, or an array of unknown bound.
+ case UTT_IsDestructible:
+ case UTT_IsNothrowDestructible:
+ case UTT_IsTriviallyDestructible:
if (ArgTy->isIncompleteArrayType() || ArgTy->isVoidType())
return true;
{ int arr[T(__has_trivial_constructor(const Int))]; }
{ int arr[T(__has_trivial_constructor(AllDefaulted))]; }
{ int arr[T(__has_trivial_constructor(AllDeleted))]; }
+ { int arr[T(__has_trivial_constructor(ACompleteType[]))]; }
+ { int arr[F(__has_trivial_constructor(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_constructor(HasCons))]; }
{ int arr[F(__has_trivial_constructor(HasRef))]; }
{ int arr[F(__has_trivial_constructor(HasCopy))]; }
{ int arr[T(__has_trivial_move_constructor(HasCons))]; }
{ int arr[T(__has_trivial_move_constructor(HasStaticMemberMoveCtor))]; }
{ int arr[T(__has_trivial_move_constructor(AllDeleted))]; }
-
+ { int arr[T(__has_trivial_move_constructor(ACompleteType[]))]; }
+
+ { int arr[F(__has_trivial_move_constructor(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_move_constructor(HasVirt))]; }
{ int arr[F(__has_trivial_move_constructor(DerivesVirt))]; }
{ int arr[F(__has_trivial_move_constructor(HasMoveCtor))]; }
{ int arr[T(__has_trivial_copy(AllDeleted))]; }
{ int arr[T(__has_trivial_copy(DerivesAr))]; }
{ int arr[T(__has_trivial_copy(DerivesHasRef))]; }
+ { int arr[T(__has_trivial_copy(ACompleteType[]))]; }
+ { int arr[F(__has_trivial_copy(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_copy(HasCopy))]; }
{ int arr[F(__has_trivial_copy(HasTemplateCons))]; }
{ int arr[F(__has_trivial_copy(VirtAr))]; }
{ int arr[T(__has_trivial_assign(AllDeleted))]; }
{ int arr[T(__has_trivial_assign(DerivesAr))]; }
{ int arr[T(__has_trivial_assign(DerivesHasRef))]; }
+ { int arr[T(__has_trivial_assign(ACompleteType[]))]; }
+ { int arr[F(__has_trivial_assign(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_assign(IntRef))]; }
{ int arr[F(__has_trivial_assign(HasCopyAssign))]; }
{ int arr[F(__has_trivial_assign(const Int))]; }
{ int arr[T(__has_trivial_destructor(AllDefaulted))]; }
{ int arr[T(__has_trivial_destructor(AllDeleted))]; }
{ int arr[T(__has_trivial_destructor(DerivesHasRef))]; }
+ { int arr[T(__has_trivial_destructor(ACompleteType[]))]; }
{ int arr[F(__has_trivial_destructor(HasDest))]; }
+ { int arr[F(__has_trivial_destructor(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_destructor(void))]; }
{ int arr[F(__has_trivial_destructor(cvoid))]; }
{ int arr[F(__has_trivial_destructor(AllPrivate))]; }
{ int arr[T(__has_nothrow_assign(AllPrivate))]; }
{ int arr[T(__has_nothrow_assign(UsingAssign))]; }
{ int arr[T(__has_nothrow_assign(DerivesAr))]; }
+ { int arr[T(__has_nothrow_assign(ACompleteType[]))]; }
+ { int arr[F(__has_nothrow_assign(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_nothrow_assign(IntRef))]; }
{ int arr[F(__has_nothrow_assign(HasCopyAssign))]; }
{ int arr[F(__has_nothrow_assign(HasMultipleCopyAssign))]; }
{ int arr[T(__has_nothrow_move_assign(HasMemberNoThrowMoveAssign))]; }
{ int arr[T(__has_nothrow_move_assign(HasMemberNoExceptNoThrowMoveAssign))]; }
{ int arr[T(__has_nothrow_move_assign(AllDeleted))]; }
+ { int arr[T(__has_nothrow_move_assign(ACompleteType[]))]; }
-
+ { int arr[F(__has_nothrow_move_assign(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_nothrow_move_assign(HasThrowMoveAssign))]; }
{ int arr[F(__has_nothrow_move_assign(HasNoExceptFalseMoveAssign))]; }
{ int arr[F(__has_nothrow_move_assign(HasMemberThrowMoveAssign))]; }
{ int arr[T(__has_trivial_move_assign(Int))]; }
{ int arr[T(__has_trivial_move_assign(HasStaticMemberMoveAssign))]; }
{ int arr[T(__has_trivial_move_assign(AllDeleted))]; }
+ { int arr[T(__has_trivial_move_assign(ACompleteType[]))]; }
+ { int arr[F(__has_trivial_move_assign(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_trivial_move_assign(HasVirt))]; }
{ int arr[F(__has_trivial_move_assign(DerivesVirt))]; }
{ int arr[F(__has_trivial_move_assign(HasMoveAssign))]; }
{ int arr[T(__has_nothrow_copy(HasTemplateCons))]; }
{ int arr[T(__has_nothrow_copy(AllPrivate))]; }
{ int arr[T(__has_nothrow_copy(DerivesAr))]; }
+ { int arr[T(__has_nothrow_copy(ACompleteType[]))]; }
+ { int arr[F(__has_nothrow_copy(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_nothrow_copy(HasCopy))]; }
{ int arr[F(__has_nothrow_copy(HasMultipleCopy))]; }
{ int arr[F(__has_nothrow_copy(VirtAr))]; }
{ int arr[T(__has_nothrow_constructor(HasVirtDest))]; }
// { int arr[T(__has_nothrow_constructor(VirtAr))]; } // not implemented
{ int arr[T(__has_nothrow_constructor(AllPrivate))]; }
+ { int arr[T(__has_nothrow_constructor(ACompleteType[]))]; }
+ { int arr[F(__has_nothrow_constructor(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[F(__has_nothrow_constructor(HasCons))]; }
{ int arr[F(__has_nothrow_constructor(HasRef))]; }
{ int arr[F(__has_nothrow_constructor(HasCopy))]; }
{ int arr[F(__has_virtual_destructor(HasMoveAssign))]; }
{ int arr[F(__has_virtual_destructor(IntRef))]; }
{ int arr[F(__has_virtual_destructor(VirtAr))]; }
+ { int arr[F(__has_virtual_destructor(ACompleteType[]))]; }
+ { int arr[F(__has_virtual_destructor(AnIncompleteType[]))]; } // expected-error {{incomplete type}}
{ int arr[T(__has_virtual_destructor(HasVirtDest))]; }
{ int arr[T(__has_virtual_destructor(DerivedVirtDest))]; }
{ int arr[F(__has_virtual_destructor(VirtDestAr))]; }