summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprObjC.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-03-03 17:28:16 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-03-03 17:28:16 +0000
commit79ade4e028932fcb9dab15e2fb2305ca15ab0f14 (patch)
treee1a885aadfd80632f5bd70d4bd2d37e715e35a79 /lib/Sema/SemaExprObjC.cpp
parentecb7e5c8afe929ee38155db94de6b084ec32a645 (diff)
Notes
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r--lib/Sema/SemaExprObjC.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index 0c5d8efa288b..3a05241c016b 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -426,14 +426,14 @@ Sema::ExprResult Sema::ActOnClassMessage(
if (!ClassDecl) {
NamedDecl *IDecl
= LookupSingleName(TUScope, receiverName, LookupOrdinaryName);
- if (TypedefDecl *OCTD = dyn_cast_or_null<TypedefDecl>(IDecl)) {
- const ObjCInterfaceType *OCIT;
- OCIT = OCTD->getUnderlyingType()->getAs<ObjCInterfaceType>();
- if (!OCIT) {
- Diag(receiverLoc, diag::err_invalid_receiver_to_message);
- return true;
- }
- ClassDecl = OCIT->getDecl();
+ if (TypedefDecl *OCTD = dyn_cast_or_null<TypedefDecl>(IDecl))
+ if (const ObjCInterfaceType *OCIT
+ = OCTD->getUnderlyingType()->getAs<ObjCInterfaceType>())
+ ClassDecl = OCIT->getDecl();
+
+ if (!ClassDecl) {
+ Diag(receiverLoc, diag::err_invalid_receiver_to_message);
+ return true;
}
}
assert(ClassDecl && "missing interface declaration");