diff options
| author | Douglas Gregor <dgregor@apple.com> | 2008-11-27 00:44:28 +0000 | 
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2008-11-27 00:44:28 +0000 | 
| commit | e7dd145c022d99b8e2652f24f6737f5a6f1e656e (patch) | |
| tree | 8d50ed3b11b3b7b420fc4b1e36af474fe8d0ab48 /clang/lib/Sema | |
| parent | 73bc0ba4c965cb83e076cb7f80df3c737c8f1dc0 (diff) | |
| download | bcm5719-llvm-e7dd145c022d99b8e2652f24f6737f5a6f1e656e.tar.gz bcm5719-llvm-e7dd145c022d99b8e2652f24f6737f5a6f1e656e.zip | |
Don't complain about block pointer to void* conversions
llvm-svn: 60138
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 9 | 
2 files changed, 3 insertions, 10 deletions
| diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 614e4873bac..57caa6ecf24 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -1166,10 +1166,6 @@ public:      /// 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. diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index b22ae7d1f2b..e21047e10d8 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1917,7 +1917,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) {      if (rhsType->getAsBlockPointerType()) {        if (lhsType->getAsPointerType()->getPointeeType()->isVoidType()) -        return BlockVoidPointer; +        return Compatible;        // Treat block pointers as objects.        if (getLangOptions().ObjC1 && @@ -1941,7 +1941,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) {      if (const PointerType *RHSPT = rhsType->getAsPointerType()) {        if (RHSPT->getPointeeType()->isVoidType()) -        return BlockVoidPointer; +        return Compatible;      }      return Incompatible;    } @@ -1959,7 +1959,7 @@ Sema::CheckAssignmentConstraints(QualType lhsType, QualType rhsType) {      if (isa<BlockPointerType>(lhsType) &&           rhsType->getAsPointerType()->getPointeeType()->isVoidType()) -      return BlockVoidPointer; +      return Compatible;      return Incompatible;    } @@ -3646,9 +3646,6 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy,    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. | 

