some downstream crashes, among them rdar://problem/
8229840.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109850
91177308-0d34-0410-b5e6-
96231b3b80d8
DS.getTypeSpecSign() == 0 &&
"Can't handle qualifiers on typedef names yet!");
Result = TheSema.GetTypeFromParser(DS.getTypeRep());
-
- if (DeclSpec::ProtocolQualifierListTy PQ = DS.getProtocolQualifiers()) {
+ if (Result.isNull())
+ TheDeclarator.setInvalidType(true);
+ else if (DeclSpec::ProtocolQualifierListTy PQ
+ = DS.getProtocolQualifiers()) {
if (const ObjCObjectType *ObjT = Result->getAs<ObjCObjectType>()) {
// Silently drop any existing protocol qualifiers.
// TODO: determine whether that's the right thing to do.