Skip to content

Commit c8ce5b3

Browse files
committed
ABI/API checker: don't complain about changing var to let or vice versa
The tool diagnoses the removal of getter/setter for properties, so complaining about the keyword change can be redundant. rdar://problem/57201030
1 parent 8a61284 commit c8ce5b3

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

include/swift/AST/DiagnosticsModuleDiffer.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ ERROR(decl_kind_changed,none,"%0 has been changed to a %1", (StringRef, StringRe
8080

8181
ERROR(optional_req_changed,none,"%0 is %select{now|no longer}1 an optional requirement", (StringRef, bool))
8282

83-
ERROR(var_let_changed,none,"%0 changes from %select{var|let}1 to %select{let|var}1", (StringRef, bool))
84-
8583
ERROR(no_longer_open,none,"%0 is no longer open for subclassing", (StringRef))
8684

8785
ERROR(func_type_escaping_changed,none,"%0 has %select{removed|added}2 @escaping in %1", (StringRef, StringRef, bool))

test/api-digester/Outputs/Cake-abi.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ cake: Protocol P4 is a new API without @available attribute
7676
cake: Struct C6 is now with @frozen
7777
cake: Var C1.CIIns1 changes from weak to strong
7878
cake: Var C1.CIIns2 changes from strong to weak
79-
cake: Var GlobalLetChangedToVar changes from let to var
80-
cake: Var GlobalVarChangedToLet changes from var to let
8179
cake: Var RequiementChanges.addedVar is a new API without @available attribute
8280
cake: Var fixedLayoutStruct.$__lazy_storage_$_lazy_d is a new API without @available attribute
8381
cake: Var fixedLayoutStruct.c is a new API without @available attribute

tools/swift-api-digester/ModuleDiagsConsumer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ static StringRef getCategoryName(uint32_t ID) {
4242
return "/* Renamed Decls */";
4343
case LocalDiagID::decl_attr_change:
4444
case LocalDiagID::decl_new_attr:
45-
case LocalDiagID::var_let_changed:
4645
case LocalDiagID::func_self_access_change:
4746
case LocalDiagID::new_decl_without_intro:
4847
return "/* Decl Attribute changes */";

tools/swift-api-digester/swift-api-digester.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -962,9 +962,6 @@ void swift::ide::api::SDKNodeDeclVar::diagnose(SDKNode *Right) {
962962
if (hasFixedBinaryOrder() != RV->hasFixedBinaryOrder()) {
963963
emitDiag(Loc, diag::var_has_fixed_order_change, hasFixedBinaryOrder());
964964
}
965-
if (isLet() != RV->isLet()) {
966-
emitDiag(Loc, diag::var_let_changed, isLet());
967-
}
968965
}
969966
}
970967

0 commit comments

Comments
 (0)