mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
clang-format
This commit is contained in:
@@ -214,18 +214,19 @@ static void emitProvidesTopLevelNames(
|
||||
out << "- \"" << escape(operatorFunction->getName()) << "\"\n";
|
||||
}
|
||||
|
||||
static void emitProvidesExtensionDecl(const ExtensionDecl *ED,
|
||||
llvm::raw_fd_ostream &out,
|
||||
static void emitProvidesExtensionDecl(
|
||||
const ExtensionDecl *ED, llvm::raw_fd_ostream &out,
|
||||
llvm::MapVector<const NominalTypeDecl *, bool> &extendedNominals,
|
||||
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
|
||||
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers);
|
||||
|
||||
static void emitProvidesNominalTypeDecl(const NominalTypeDecl *NTD,
|
||||
llvm::raw_fd_ostream &out,
|
||||
static void emitProvidesNominalTypeDecl(
|
||||
const NominalTypeDecl *NTD, llvm::raw_fd_ostream &out,
|
||||
llvm::MapVector<const NominalTypeDecl *, bool> &extendedNominals,
|
||||
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls);
|
||||
|
||||
static void emitProvidesValueDecl(const ValueDecl *VD, llvm::raw_fd_ostream &out);
|
||||
static void emitProvidesValueDecl(const ValueDecl *VD,
|
||||
llvm::raw_fd_ostream &out);
|
||||
|
||||
static void emitProvidesTopLevelDecl(
|
||||
const Decl *const D, llvm::raw_fd_ostream &out,
|
||||
@@ -241,7 +242,8 @@ static void emitProvidesTopLevelDecl(
|
||||
break;
|
||||
|
||||
case DeclKind::Extension:
|
||||
emitProvidesExtensionDecl(cast<ExtensionDecl>(D), out, extendedNominals, memberOperatorDecls, extensionsWithJustMembers);
|
||||
emitProvidesExtensionDecl(cast<ExtensionDecl>(D), out, extendedNominals,
|
||||
memberOperatorDecls, extensionsWithJustMembers);
|
||||
break;
|
||||
|
||||
case DeclKind::InfixOperator:
|
||||
@@ -258,7 +260,8 @@ static void emitProvidesTopLevelDecl(
|
||||
case DeclKind::Struct:
|
||||
case DeclKind::Class:
|
||||
case DeclKind::Protocol:
|
||||
emitProvidesNominalTypeDecl(cast<NominalTypeDecl>(D), out, extendedNominals, memberOperatorDecls);
|
||||
emitProvidesNominalTypeDecl(cast<NominalTypeDecl>(D), out, extendedNominals,
|
||||
memberOperatorDecls);
|
||||
break;
|
||||
|
||||
case DeclKind::TypeAlias:
|
||||
@@ -289,16 +292,15 @@ static void emitProvidesTopLevelDecl(
|
||||
}
|
||||
}
|
||||
|
||||
static void emitProvidesExtensionDecl(const ExtensionDecl *const ED,
|
||||
llvm::raw_fd_ostream &out,
|
||||
static void emitProvidesExtensionDecl(
|
||||
const ExtensionDecl *const ED, llvm::raw_fd_ostream &out,
|
||||
llvm::MapVector<const NominalTypeDecl *, bool> &extendedNominals,
|
||||
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
|
||||
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers) {
|
||||
auto *NTD = ED->getExtendedType()->getAnyNominal();
|
||||
if (!NTD)
|
||||
return;
|
||||
if (NTD->hasAccess() &&
|
||||
NTD->getFormalAccess() <= AccessLevel::FilePrivate) {
|
||||
if (NTD->hasAccess() && NTD->getFormalAccess() <= AccessLevel::FilePrivate) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -319,14 +321,13 @@ static void emitProvidesExtensionDecl(const ExtensionDecl *const ED,
|
||||
ED->getMembers());
|
||||
}
|
||||
|
||||
static void emitProvidesNominalTypeDecl(const NominalTypeDecl *const NTD,
|
||||
llvm::raw_fd_ostream &out,
|
||||
static void emitProvidesNominalTypeDecl(
|
||||
const NominalTypeDecl *const NTD, llvm::raw_fd_ostream &out,
|
||||
llvm::MapVector<const NominalTypeDecl *, bool> &extendedNominals,
|
||||
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls) {
|
||||
if (!NTD->hasName())
|
||||
return;
|
||||
if (NTD->hasAccess() &&
|
||||
NTD->getFormalAccess() <= AccessLevel::FilePrivate) {
|
||||
if (NTD->hasAccess() && NTD->getFormalAccess() <= AccessLevel::FilePrivate) {
|
||||
return;
|
||||
}
|
||||
out << "- \"" << escape(NTD->getName()) << "\"\n";
|
||||
@@ -335,7 +336,8 @@ static void emitProvidesNominalTypeDecl(const NominalTypeDecl *const NTD,
|
||||
NTD->getMembers());
|
||||
}
|
||||
|
||||
static void emitProvidesValueDecl(const ValueDecl *const VD, llvm::raw_fd_ostream &out) {
|
||||
static void emitProvidesValueDecl(const ValueDecl *const VD,
|
||||
llvm::raw_fd_ostream &out) {
|
||||
if (!VD->hasName())
|
||||
return;
|
||||
if (VD->hasAccess() && VD->getFormalAccess() <= AccessLevel::FilePrivate) {
|
||||
@@ -344,7 +346,6 @@ static void emitProvidesValueDecl(const ValueDecl *const VD, llvm::raw_fd_ostrea
|
||||
out << "- \"" << escape(VD->getBaseName()) << "\"\n";
|
||||
}
|
||||
|
||||
|
||||
static void emitProvidesNominalTypes(
|
||||
const llvm::MapVector<const NominalTypeDecl *, bool> &extendedNominals,
|
||||
llvm::raw_fd_ostream &out) {
|
||||
|
||||
Reference in New Issue
Block a user