add a hackaround for rdar://15753317. I don't unerstand the code enough to tell if this is the right fix.

Swift SVN r11927
This commit is contained in:
Chris Lattner
2014-01-06 16:48:13 +00:00
parent 6ec92b2ca6
commit 31c328bdcf

View File

@@ -1776,7 +1776,9 @@ void NodePrinter::print(Node *pointer, bool asContext, bool suppressType) {
if (hasName) print(pointer->getChild(1));
Printer << extraName;
if (printType) {
if (printType &&
// FIXME: Hack for rdar://15753317
pointer->getNumChildren() > 1 + unsigned(hasName)) {
Node *type = pointer->getChild(1 + unsigned(hasName));
if (typeNeedsColonForDecl(type))
Printer << " : ";