Skip to content

Commit 65dda6d

Browse files
committed
Address other review feedback
1 parent 998434f commit 65dda6d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

include/swift/AST/Attr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ DECL_ATTR(_projectedValueProperty, ProjectedValueProperty,
498498
89)
499499
SIMPLE_DECL_ATTR(_nonEphemeral, NonEphemeral,
500500
OnParam | UserInaccessible |
501-
ABIStableToAdd | ABIStableToRemove | APIStableToAdd | APIStableToRemove,
501+
ABIStableToAdd | ABIStableToRemove | APIBreakingToAdd | APIStableToRemove,
502502
90)
503503

504504
SIMPLE_DECL_ATTR(IBSegueAction, IBSegueAction,

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2796,7 +2796,7 @@ NOTE(escaping_optional_type_argument, none,
27962796

27972797
// @_nonEphemeral attribute
27982798
ERROR(non_ephemeral_non_pointer_type,none,
2799-
"@_nonEphemeral attribute currently only applies to pointer types", ())
2799+
"@_nonEphemeral attribute only applies to pointer types", ())
28002800

28012801
// NSManaged attribute
28022802
ERROR(attr_NSManaged_not_instance_member,none,

lib/Sema/CSFix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,8 +1026,8 @@ TreatEphemeralAsNonEphemeral *TreatEphemeralAsNonEphemeral::create(
10261026
}
10271027

10281028
std::string TreatEphemeralAsNonEphemeral::getName() const {
1029-
llvm::SmallString<32> name;
1029+
std::string name;
10301030
name += "treat ephemeral as non-ephemeral for ";
10311031
name += ::getName(ConversionKind);
1032-
return name.c_str();
1032+
return name;
10331033
}

test/attr/attributes.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ func unownedOptionals(x: C) {
286286

287287
// @_nonEphemeral attribute
288288
struct S1<T> {
289-
func foo(@_nonEphemeral _ x: String) {} // expected-error {{@_nonEphemeral attribute currently only applies to pointer types}}
290-
func bar(@_nonEphemeral _ x: T) {} // expected-error {{@_nonEphemeral attribute currently only applies to pointer types}}
289+
func foo(@_nonEphemeral _ x: String) {} // expected-error {{@_nonEphemeral attribute only applies to pointer types}}
290+
func bar(@_nonEphemeral _ x: T) {} // expected-error {{@_nonEphemeral attribute only applies to pointer types}}
291291

292-
func baz<U>(@_nonEphemeral _ x: U) {} // expected-error {{@_nonEphemeral attribute currently only applies to pointer types}}
292+
func baz<U>(@_nonEphemeral _ x: U) {} // expected-error {{@_nonEphemeral attribute only applies to pointer types}}
293293

294294
func qux(@_nonEphemeral _ x: UnsafeMutableRawPointer) {}
295295
func quux(@_nonEphemeral _ x: UnsafeMutablePointer<Int>?) {}

0 commit comments

Comments
 (0)