diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-07-23 15:58:24 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-07-23 15:58:24 +0000 |
| commit | 5cc2c8b9c307edd156cc4622490a2f9447d90702 (patch) | |
| tree | 831021265eb313e4753dedf04ae1eb95ca19e4aa /clang/lib/Sema/SemaExprObjC.cpp | |
| parent | 572404311a67b22557f3716bc0e8842250e05c85 (diff) | |
| download | bcm5719-llvm-5cc2c8b9c307edd156cc4622490a2f9447d90702.tar.gz bcm5719-llvm-5cc2c8b9c307edd156cc4622490a2f9447d90702.zip | |
Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.
Patch from Anton Yartsev!
llvm-svn: 109229
Diffstat (limited to 'clang/lib/Sema/SemaExprObjC.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExprObjC.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExprObjC.cpp b/clang/lib/Sema/SemaExprObjC.cpp index 5132464d244..b0f9b2cd246 100644 --- a/clang/lib/Sema/SemaExprObjC.cpp +++ b/clang/lib/Sema/SemaExprObjC.cpp @@ -967,9 +967,8 @@ Sema::OwningExprResult Sema::BuildInstanceMessage(ExprArg ReceiverE, if (Method && DiagnoseUseOfDecl(Method, Loc)) return ExprError(); } else if (!Context.getObjCIdType().isNull() && - (ReceiverType->isPointerType() || - (ReceiverType->isIntegerType() && - ReceiverType->isScalarType()))) { + (ReceiverType->isPointerType() || + ReceiverType->isIntegerType())) { // Implicitly convert integers and pointers to 'id' but emit a warning. Diag(Loc, diag::warn_bad_receiver_type) << ReceiverType |

