Skip to content

Commit 5de7211

Browse files
committed
AST: Rename createForAlternative() to createForAsyncAlternative().
1 parent 88c0638 commit 5de7211

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

include/swift/AST/Attr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,8 @@ class AvailableAttr : public DeclAttribute {
851851

852852
/// Create an AvailableAttr that indicates the given \p AsyncFunc should be
853853
/// preferentially used in async contexts
854-
static AvailableAttr *createForAlternative(ASTContext &C,
855-
AbstractFunctionDecl *AsyncFunc);
854+
static AvailableAttr *
855+
createForAsyncAlternative(ASTContext &C, AbstractFunctionDecl *AsyncFunc);
856856

857857
AvailableAttr *clone(ASTContext &C, bool implicit) const;
858858
AvailableAttr *clone(ASTContext &C) const {

lib/AST/Attr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,8 +2267,9 @@ AvailableAttr::createPlatformAgnostic(ASTContext &C,
22672267
Kind, /* isImplicit */ false, /*SPI*/false);
22682268
}
22692269

2270-
AvailableAttr *AvailableAttr::createForAlternative(
2271-
ASTContext &C, AbstractFunctionDecl *AsyncFunc) {
2270+
AvailableAttr *
2271+
AvailableAttr::createForAsyncAlternative(ASTContext &C,
2272+
AbstractFunctionDecl *AsyncFunc) {
22722273
llvm::VersionTuple NoVersion;
22732274
return new (C) AvailableAttr(
22742275
SourceLoc(), SourceRange(), PlatformKind::none, "", "", AsyncFunc,

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7887,7 +7887,7 @@ void addCompletionHandlerAttribute(Decl *asyncImport,
78877887
if (member != asyncImport && isa<AbstractFunctionDecl>(member) &&
78887888
!member->getAttrs().hasAttribute<AvailableAttr>()) {
78897889
member->getAttrs().add(
7890-
AvailableAttr::createForAlternative(SwiftContext, asyncFunc));
7890+
AvailableAttr::createForAsyncAlternative(SwiftContext, asyncFunc));
78917891
}
78927892
}
78937893
}

0 commit comments

Comments
 (0)