- 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
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;
}