Index: lib/Sema/SemaExprCXX.cpp =================================================================== --- lib/Sema/SemaExprCXX.cpp +++ lib/Sema/SemaExprCXX.cpp @@ -4081,10 +4081,11 @@ case UTT_HasTrivialCopy: case UTT_HasTrivialDestructor: case UTT_HasVirtualDestructor: - // Arrays of unknown bound are expressly allowed. - QualType ElTy = ArgTy; - if (ArgTy->isIncompleteArrayType()) - ElTy = S.Context.getAsArrayType(ArgTy)->getElementType(); + // C++14 [meta.unary.prop] + // remove_all_extents_t shall be a complete type or + // (possibly cv-qualified) void. + // See LWG 2015 + QualType ElTy = S.Context.getBaseElementType(ArgTy); // The void type is expressly allowed. if (ElTy->isVoidType()) Index: test/SemaCXX/type-traits-incomplete.cpp =================================================================== --- test/SemaCXX/type-traits-incomplete.cpp +++ test/SemaCXX/type-traits-incomplete.cpp @@ -1,8 +1,15 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s -struct S; // expected-note 2 {{forward declaration of 'S'}} +struct S; // expected-note 4 {{forward declaration of 'S'}} +typedef S SAr[10]; +typedef S SArNB[]; +typedef S SArMB[10][2]; void f() { __is_pod(S); // expected-error{{incomplete type 'S' used in type trait expression}} __is_pod(S[]); // expected-error{{incomplete type 'S' used in type trait expression}} + __is_pod(S[10][2]); // expected-error{{incomplete type 'S' used in type trait expression}} + __is_pod(S[][10]); // expected-error{{incomplete type 'S' used in type trait expression}} + (void)__is_pod(void); // OK + (void)__is_pod(const volatile void); // OK }