Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
Bob Wilson
2016-12-13 10:23:03 -08:00
703 changed files with 12297 additions and 6112 deletions

View File

@@ -232,6 +232,8 @@ static StringRef getKeyContent(SDKContext &Ctx, KeyKind Kind) {
#define KEY(NAME) case KeyKind::KK_##NAME: return Ctx.buffer(#NAME);
#include "DigesterEnums.def"
}
llvm_unreachable("Unhandled KeyKind in switch.");
}
// The node kind appearing in the tree that describes the content of the SDK
@@ -277,6 +279,8 @@ static raw_ostream &operator<<(raw_ostream &Out, const DeclKind Value) {
#define DECL(X, PARENT) case DeclKind::X: return Out << #X;
#include "swift/AST/DeclNodes.def"
}
llvm_unreachable("Unhandled DeclKind in switch.");
}
struct SDKNodeInitInfo {
@@ -644,6 +648,8 @@ bool SDKNodeDecl::classof(const SDKNode *N) {
case SDKNodeKind::TypeNameAlias:
return false;
}
llvm_unreachable("Unhandled SDKNodeKind in switch.");
}
void SDKNodeDecl::addDeclAttribute(SDKDeclAttrKind DAKind) {
@@ -938,6 +944,8 @@ bool SDKNode::operator==(const SDKNode &Other) const {
hasSameChildren(Other);
}
}
llvm_unreachable("Unhanlded SDKNodeKind in switch.");
}
// The pretty printer of a tree of SDKNode
@@ -2983,6 +2991,8 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
case Ownership::Unowned: return Ctx.buffer("unowned");
case Ownership::Unmanaged: return Ctx.buffer("unowned(unsafe)");
}
llvm_unreachable("Unhandled Ownership in switch.");
};
auto *Count = UpdateMap.findUpdateCounterpart(Node)->getAs<SDKNodeDecl>();
AttrChangedDecls.Diags.emplace_back(Node->getDeclKind(),