[cfe-commits] r60138 - in /cfe/trunk/lib/Sema: Sema.h SemaExpr.cpp
Douglas Gregor
doug.gregor at gmail.com
Wed Nov 26 16:44:28 PST 2008
Author: dgregor
Date: Wed Nov 26 18:44:28 2008
New Revision: 60138
URL: http://llvm.org/viewvc/llvm-project?rev=60138&view=rev
Log:
Don't complain about block pointer to void* conversions
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=60138&r1=60137&r2=60138&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Wed Nov 26 18:44:28 2008
@@ -1166,10 +1166,6 @@
/// pointers types that are not compatible.
IncompatibleBlockPointer,
- /// BlockVoidPointer - The assignment is between a block pointer and
- /// void*, we accept for now.
- BlockVoidPointer,
-
/// IncompatibleObjCQualifiedId - The assignment is between a qualified
/// id type and something else (that is incompatible with it). For example,
/// "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=60138&r1=60137&r2=60138&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Nov 26 18:44:28 2008
@@ -1917,7 +1917,7 @@
if (rhsType->getAsBlockPointerType()) {
if (lhsType->getAsPointerType()->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
// Treat block pointers as objects.
if (getLangOptions().ObjC1 &&
@@ -1941,7 +1941,7 @@
if (const PointerType *RHSPT = rhsType->getAsPointerType()) {
if (RHSPT->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
}
return Incompatible;
}
@@ -1959,7 +1959,7 @@
if (isa<BlockPointerType>(lhsType) &&
rhsType->getAsPointerType()->getPointeeType()->isVoidType())
- return BlockVoidPointer;
+ return Compatible;
return Incompatible;
}
@@ -3646,9 +3646,6 @@
case IncompatibleBlockPointer:
DiagKind = diag::ext_typecheck_convert_incompatible_block_pointer;
break;
- case BlockVoidPointer:
- DiagKind = diag::ext_typecheck_convert_pointer_void_block;
- break;
case IncompatibleObjCQualifiedId:
// FIXME: Diagnose the problem in ObjCQualifiedIdTypesAreCompatible, since
// it can give a more specific diagnostic.
More information about the cfe-commits
mailing list