Author: ddunbar
Date: Sat Sep 27 17:21:14 2008
New Revision: 56756
URL: http://llvm.org/viewvc/llvm-project?rev=56756&view=rev
Log:
Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some
investigation.
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=56756&r1=56755&r2=56756&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Sat Sep 27 17:21:14 2008
@@ -1468,8 +1468,11 @@
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;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits