fprintf(F, "%s", selector.getIdentifierInfoForSlot(0)->getName());
else {
for (unsigned i = 0, e = Node->getNumArgs(); i != e; ++i)
- fprintf(F, "%s:", selector.getIdentifierInfoForSlot(i)->getName());
+ if (selector.getIdentifierInfoForSlot(i))
+ fprintf(F, "%s:", selector.getIdentifierInfoForSlot(i)->getName());
+ else
+ fprintf(F, ":");
}
}
OS << " " << selector.getIdentifierInfoForSlot(0)->getName();
else {
for (unsigned i = 0, e = Node->getNumArgs(); i != e; ++i)
- OS << selector.getIdentifierInfoForSlot(i)->getName() << ":";
+ if (selector.getIdentifierInfoForSlot(i))
+ OS << selector.getIdentifierInfoForSlot(i)->getName() << ":";
+ else
+ OS << ":";
}
OS << ")";
}
OS << " " << selector.getIdentifierInfoForSlot(0)->getName();
} else {
for (unsigned i = 0, e = Mess->getNumArgs(); i != e; ++i) {
- OS << " " << selector.getIdentifierInfoForSlot(i)->getName() << ":";
+ if (selector.getIdentifierInfoForSlot(i))
+ OS << selector.getIdentifierInfoForSlot(i)->getName() << ":";
+ else
+ OS << ":";
PrintExpr(Mess->getArg(i));
}
}
Diag(Tok, diag::err_expected_ident); // missing selector name.
return 0;
}
- if (!SelIdent)
- SelIdent = &PP.getIdentifierTable().get("");
KeyIdents.push_back(SelIdent);
if (Tok.isNot(tok::r_paren))
while (1) {
// Check for another keyword selector.
SourceLocation Loc;
SelIdent = ParseObjCSelector(Loc);
- if (!SelIdent)
- SelIdent = &PP.getIdentifierTable().get("");
KeyIdents.push_back(SelIdent);
if (!SelIdent && Tok.isNot(tok::colon))
break;