aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaNamedCast.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-24 20:13:58 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-24 20:13:58 +0000
commit8dcb29db8483d4dcaeeecc0e653b642b0a41cd2c (patch)
tree75e7a84f6aacdd9080f870653b65f619b171f4a4 /lib/Sema/SemaNamedCast.cpp
parente7450f5dbd5bed63b8ef9db86350a8fc3db011e8 (diff)
Fix a few isObjectTypes that really need to be isIncompleteOrObject
types; add another use of RequireCompleteType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67644 91177308-0d34-0410-b5e6-96231b3b80d8
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)) {