diff --git a/lib/ASTGen/Sources/MacroEvaluation/SourceManager.swift b/lib/ASTGen/Sources/MacroEvaluation/SourceManager.swift index cea6fef7f9867..380aace8ade29 100644 --- a/lib/ASTGen/Sources/MacroEvaluation/SourceManager.swift +++ b/lib/ASTGen/Sources/MacroEvaluation/SourceManager.swift @@ -216,6 +216,17 @@ extension SourceManager { at: replacementRange.upperBound ) newText = replacingChildData.newChild.description + + case .textualReplacement(replacementRange: let replacementRange, sourceFile: let sourceFile, newText: let replacementText): + replaceStartLoc = bridgedSourceLoc( + for: sourceFile, + at: replacementRange.lowerBound + ) + replaceEndLoc = bridgedSourceLoc( + for: sourceFile, + at: replacementRange.upperBound + ) + newText = replacementText } newText.withBridgedString { bridgedMessage in