@@ -49,7 +49,7 @@ func evaluateIfConfig(
4949 /// Record an if-config evaluation error before returning it. Use this for
5050 /// every 'throw' site in this evaluation.
5151 func recordError(
52- _ error: IfConfigError
52+ _ error: IfConfigDiagnostic
5353 ) -> ( active: Bool , syntaxErrorsAllowed: Bool , diagnostics: [ Diagnostic ] ) {
5454 return recordError ( error, at: error. syntax)
5555 }
@@ -87,7 +87,7 @@ func evaluateIfConfig(
8787 active: result,
8888 syntaxErrorsAllowed: false ,
8989 diagnostics: [
90- IfConfigError . integerLiteralCondition (
90+ IfConfigDiagnostic . integerLiteralCondition (
9191 syntax: condition,
9292 replacement: result
9393 ) . asDiagnostic
@@ -234,7 +234,7 @@ func evaluateIfConfig(
234234 // The historical "macabi" environment has been renamed to "macCatalyst".
235235 if role == " environment " && arg == " macabi " {
236236 extraDiagnostics. append (
237- IfConfigError . macabiIsMacCatalyst ( syntax: argExpr)
237+ IfConfigDiagnostic . macabiIsMacCatalyst ( syntax: argExpr)
238238 . asDiagnostic
239239 )
240240
@@ -335,7 +335,7 @@ func evaluateIfConfig(
335335 } else {
336336 // Complain about unknown endianness
337337 extraDiagnostics. append (
338- IfConfigError . endiannessDoesNotMatch ( syntax: argExpr, argument: arg)
338+ IfConfigDiagnostic . endiannessDoesNotMatch ( syntax: argExpr, argument: arg)
339339 . asDiagnostic
340340 )
341341
@@ -466,7 +466,7 @@ func evaluateIfConfig(
466466
467467 // Warn that we did this.
468468 extraDiagnostics. append (
469- IfConfigError . ignoredTrailingComponents (
469+ IfConfigDiagnostic . ignoredTrailingComponents (
470470 version: versionTuple,
471471 syntax: secondArg. expression
472472 ) . asDiagnostic
@@ -542,7 +542,7 @@ private func extractImportPath(_ expression: some ExprSyntaxProtocol) throws ->
542542 return [ name]
543543 }
544544
545- throw IfConfigError . expectedModuleName ( syntax: ExprSyntax ( expression) )
545+ throw IfConfigDiagnostic . expectedModuleName ( syntax: ExprSyntax ( expression) )
546546}
547547
548548/// Determine whether the given condition only involves disjunctions that
@@ -624,7 +624,7 @@ private func diagnoseLikelySimulatorEnvironmentTest(
624624 return nil
625625 }
626626
627- return IfConfigError . likelySimulatorPlatform ( syntax: ExprSyntax ( binOp) ) . asDiagnostic
627+ return IfConfigDiagnostic . likelySimulatorPlatform ( syntax: ExprSyntax ( binOp) ) . asDiagnostic
628628}
629629
630630extension IfConfigClauseSyntax {
@@ -643,7 +643,7 @@ extension IfConfigClauseSyntax {
643643 {
644644
645645 foldingDiagnostics. append (
646- IfConfigError . badInfixOperator ( syntax: ExprSyntax ( binOp) ) . asDiagnostic
646+ IfConfigDiagnostic . badInfixOperator ( syntax: ExprSyntax ( binOp) ) . asDiagnostic
647647 )
648648 return
649649 }
0 commit comments