If a TST_typename has a null type, mark the declarator invalid. Prevents
some downstream crashes, among them rdar://problem/8229840. llvm-svn: 109850
This commit is contained in:
parent
45d494785d
commit
0925714eca
|
@ -298,8 +298,10 @@ static QualType ConvertDeclSpecToType(Sema &TheSema,
|
||||||
DS.getTypeSpecSign() == 0 &&
|
DS.getTypeSpecSign() == 0 &&
|
||||||
"Can't handle qualifiers on typedef names yet!");
|
"Can't handle qualifiers on typedef names yet!");
|
||||||
Result = TheSema.GetTypeFromParser(DS.getTypeRep());
|
Result = TheSema.GetTypeFromParser(DS.getTypeRep());
|
||||||
|
if (Result.isNull())
|
||||||
if (DeclSpec::ProtocolQualifierListTy PQ = DS.getProtocolQualifiers()) {
|
TheDeclarator.setInvalidType(true);
|
||||||
|
else if (DeclSpec::ProtocolQualifierListTy PQ
|
||||||
|
= DS.getProtocolQualifiers()) {
|
||||||
if (const ObjCObjectType *ObjT = Result->getAs<ObjCObjectType>()) {
|
if (const ObjCObjectType *ObjT = Result->getAs<ObjCObjectType>()) {
|
||||||
// Silently drop any existing protocol qualifiers.
|
// Silently drop any existing protocol qualifiers.
|
||||||
// TODO: determine whether that's the right thing to do.
|
// TODO: determine whether that's the right thing to do.
|
||||||
|
|
Loading…
Reference in New Issue