aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaNamedCast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaNamedCast.cpp')
-rw-r--r--lib/Sema/SemaNamedCast.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaNamedCast.cpp b/lib/Sema/SemaNamedCast.cpp
index 96de1bbad0..8c45fe6278 100644
--- a/lib/Sema/SemaNamedCast.cpp
+++ b/lib/Sema/SemaNamedCast.cpp
@@ -520,7 +520,7 @@ CheckStaticCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
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)) {