Skip to content

Commit c4f63e1

Browse files
committed
api-digester: Make unknown decl attrs a warning
Since the API digester is designed to tolerate them anyway.
1 parent a74570b commit c4f63e1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/swift/AST/DiagnosticsCommon.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ ERROR(sdk_node_unrecognized_node_kind,none,
127127
"unrecognized SDK node kind '%0'", (StringRef))
128128
ERROR(sdk_node_unrecognized_type_attr_kind,none,
129129
"unrecognized type attribute '%0' in SDK node", (StringRef))
130-
ERROR(sdk_node_unrecognized_decl_attr_kind,none,
131-
"unrecognized declaration attribute '%0' in SDK node", (StringRef))
130+
WARNING(sdk_node_unrecognized_decl_attr_kind,none,
131+
"unrecognized declaration attribute '%0' in SDK node", (StringRef))
132132
ERROR(sdk_node_unrecognized_decl_kind,none,
133133
"unrecognized declaration kind '%0' in SDK node", (StringRef))
134134
ERROR(sdk_node_unrecognized_accessor_kind,none,

test/api-digester/diagnostics.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
// CHECK: diagnostics.json:8:15: error: unrecognized SDK node kind 'Zyzyx'
1414
// CHECK: diagnostics.json:9:41: error: unrecognized type attribute 'fnord' in SDK node
1515
// CHECK: diagnostics.json:9:59: error: unrecognized type attribute 'Available' in SDK node
16-
// CHECK: diagnostics.json:10:39: error: unrecognized declaration attribute 'Fnord' in SDK node
17-
// CHECK: diagnostics.json:10:56: error: unrecognized declaration attribute 'inout' in SDK node
16+
// CHECK: diagnostics.json:10:39: warning: unrecognized declaration attribute 'Fnord' in SDK node
17+
// CHECK: diagnostics.json:10:56: warning: unrecognized declaration attribute 'inout' in SDK node
1818
// CHECK: diagnostics.json:11:19: error: unrecognized declaration kind 'Subroutine' in SDK node
1919

2020
// Make sure we don't try to output a result:
2121
// NEGATIVE-NOT: "kind": "Root",
2222

2323
// Older versions of the compiler used 'BackDeploy' for @_backDeploy. We now use
2424
// 'BackDeployed', but we should still support the old name.
25-
// NEGATIVE-NOT: error: unrecognized declaration attribute 'BackDeploy' in SDK node
25+
// NEGATIVE-NOT: {{warning|error}}: unrecognized declaration attribute 'BackDeploy' in SDK node
2626
// NEGATIVE-NOT: is now without @backDeployed
2727

2828
// Should not have any errors in the diagnostics-compare file.
29-
// NEGATIVE-NOT: diagnostics-compare.json:{{.*}}: error:
29+
// NEGATIVE-NOT: diagnostics-compare.json:{{.*}}: {{warning|error}}:

0 commit comments

Comments
 (0)