aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-27 22:21:14 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-27 22:21:14 +0000
commit97f61d14c89c26b9ae8e8f1faa8e8fcc6ec00b77 (patch)
treeb9a93e1d4149098d63584401b515683da96220b1 /lib/CodeGen/CGObjCMac.cpp
parent062bae00f8fc0fdb1dd3ad4b1e14a63eecf4b29d (diff)
Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some investigation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index f8d5c5c6d4..983f942c2d 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -1468,8 +1468,11 @@ void CGObjCMac::EmitTryStmt(CodeGen::CodeGenFunction &CGF,
VD = cast<VarDecl>(CatchParam->getDecl());
PT = VD->getType()->getAsPointerType();
- // catch(id e) always matches.
- if (PT && CGF.getContext().isObjCIdType(PT->getPointeeType()))
+ // catch(id e) always matches.
+ // FIXME: For the time being we also match id<X>; this should
+ // be rejected by Sema instead.
+ if ((PT && CGF.getContext().isObjCIdType(PT->getPointeeType())) ||
+ VD->getType()->isObjCQualifiedIdType())
AllMatched = true;
}