Skip to content

Commit 7c1cdaf

Browse files
committed
ASTGen: Resolve 'may have additional unknown values' warnings.
1 parent 7685371 commit 7c1cdaf

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/ASTGen/Sources/ASTGen/DiagnosticsBridge.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ extension DiagnosticSeverity {
141141
case .note: return .note
142142
case .warning: return .warning
143143
case .remark: return .remark
144+
#if RESILIENT_SWIFT_SYNTAX
144145
@unknown default: return .error
146+
#endif
145147
}
146148
}
147149
}

lib/ASTGen/Sources/ASTGen/PluginHost.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ class PluginDiagnosticsEngine {
270270
case .note: bridgedSeverity = .note
271271
case .warning: bridgedSeverity = .warning
272272
case .remark: bridgedSeverity = .remark
273+
#if RESILIENT_SWIFT_SYNTAX
273274
@unknown default: bridgedSeverity = .error
275+
#endif
274276
}
275277

276278
// Emit the diagnostic

0 commit comments

Comments
 (0)