r199486 - Fix a build-bot breakage for clang-modernize when run with the MSVC ABI
David Majnemer
david.majnemer at gmail.com
Fri Jan 17 02:54:42 PST 2014
Author: majnemer
Date: Fri Jan 17 04:54:42 2014
New Revision: 199486
URL: http://llvm.org/viewvc/llvm-project?rev=199486&view=rev
Log:
Fix a build-bot breakage for clang-modernize when run with the MSVC ABI
Modified:
cfe/trunk/lib/Sema/SemaType.cpp
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=199486&r1=199485&r2=199486&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Jan 17 04:54:42 2014
@@ -1456,6 +1456,13 @@ QualType Sema::BuildArrayType(QualType T
diag::err_array_of_abstract_type))
return QualType();
+ // Mentioning a member pointer type for an array type causes us to lock in
+ // an inheritance model, even if it's inside an unused typedef.
+ if (Context.getTargetInfo().getCXXABI().isMicrosoft())
+ if (const MemberPointerType *MPTy = T->getAs<MemberPointerType>())
+ if (!MPTy->getClass()->isDependentType())
+ RequireCompleteType(Loc, T, 0);
+
} else {
// C99 6.7.5.2p1: If the element type is an incomplete or function type,
// reject it (e.g. void ary[7], struct foo ary[7], void ary[7]())
More information about the cfe-commits
mailing list