Fix a few isObjectTypes that really need to be isIncompleteOrObject
types; add another use of RequireCompleteType.
llvm-svn: 67644
diff --git a/clang/lib/Sema/SemaNamedCast.cpp b/clang/lib/Sema/SemaNamedCast.cpp
index 96de1bb..8c45fe6 100644
--- a/clang/lib/Sema/SemaNamedCast.cpp
+++ b/clang/lib/Sema/SemaNamedCast.cpp
@@ -520,7 +520,7 @@
if (SrcPointee->isVoidType()) {
if (const PointerType *DestPointer = DestType->getAsPointerType()) {
QualType DestPointee = DestPointer->getPointeeType();
- if (DestPointee->isObjectType()) {
+ if (DestPointee->isIncompleteOrObjectType()) {
// This is definitely the intended conversion, but it might fail due
// to a const violation.
if (!DestPointee.isAtLeastAsQualifiedAs(SrcPointee)) {