diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 13a4d46dcac9e..29d993b205027 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -6106,8 +6106,8 @@ ParamDecl::ParamDecl(SourceLoc specifierLoc, ParamDecl *ParamDecl::cloneWithoutType(const ASTContext &Ctx, ParamDecl *PD) { auto *Clone = new (Ctx) ParamDecl( - PD->getSpecifierLoc(), PD->getArgumentNameLoc(), PD->getArgumentName(), - PD->getArgumentNameLoc(), PD->getParameterName(), PD->getDeclContext()); + SourceLoc(), SourceLoc(), PD->getArgumentName(), + SourceLoc(), PD->getParameterName(), PD->getDeclContext()); Clone->DefaultValueAndFlags.setPointerAndInt( nullptr, PD->DefaultValueAndFlags.getInt()); Clone->Bits.ParamDecl.defaultArgumentKind = diff --git a/test/DebugInfo/Inputs/curry_thunk_other.swift b/test/DebugInfo/Inputs/curry_thunk_other.swift new file mode 100644 index 0000000000000..914596bdfbc75 --- /dev/null +++ b/test/DebugInfo/Inputs/curry_thunk_other.swift @@ -0,0 +1,7 @@ +public struct HTTPMethod { + public let rawValue: String + + public init(rawValue: String) { + self.rawValue = rawValue + } +} diff --git a/test/DebugInfo/curry_thunk.swift b/test/DebugInfo/curry_thunk.swift new file mode 100644 index 0000000000000..3197a6a78ac17 --- /dev/null +++ b/test/DebugInfo/curry_thunk.swift @@ -0,0 +1,8 @@ +// RUN: %target-swift-frontend -primary-file %s %S/Inputs/curry_thunk_other.swift -emit-ir -g -o - | %FileCheck %s + +public func testCurryThunk() -> [HTTPMethod] { + return ["asdf"].map(HTTPMethod.init) +} + +// CHECK: [[FILE:![0-9]+]] = !DIFile(filename: "{{.*}}/curry_thunk.swift", directory: "{{.*}}") +// CHECK: {{![0-9]+}} = !DILocalVariable(name: "rawValue", arg: 1, scope: {{![0-9]+}}, file: {{![0-9]+}}, type: {{![0-9]+}}, flags: DIFlagArtificial)