Skip to content

Commit 88d8d9f

Browse files
committed
AST: Don't set source location on cloned parameter lists
1 parent a676a37 commit 88d8d9f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

lib/AST/Decl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6106,8 +6106,8 @@ ParamDecl::ParamDecl(SourceLoc specifierLoc,
61066106

61076107
ParamDecl *ParamDecl::cloneWithoutType(const ASTContext &Ctx, ParamDecl *PD) {
61086108
auto *Clone = new (Ctx) ParamDecl(
6109-
PD->getSpecifierLoc(), PD->getArgumentNameLoc(), PD->getArgumentName(),
6110-
PD->getArgumentNameLoc(), PD->getParameterName(), PD->getDeclContext());
6109+
SourceLoc(), SourceLoc(), PD->getArgumentName(),
6110+
SourceLoc(), PD->getParameterName(), PD->getDeclContext());
61116111
Clone->DefaultValueAndFlags.setPointerAndInt(
61126112
nullptr, PD->DefaultValueAndFlags.getInt());
61136113
Clone->Bits.ParamDecl.defaultArgumentKind =
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public class Horse {
2+
func buck(rider: Any) {}
3+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %target-swift-frontend -emit-silgen %S/Inputs/partial_apply_debuginfo_other.swift -primary-file %s -module-name partial_apply_debuginfo -g -Xllvm -sil-print-debuginfo | %FileCheck %s
2+
3+
func doIt() {
4+
_ = Horse.buck
5+
}
6+
7+
// CHECK-NOT: partial_apply_debuginfo_other.swift

0 commit comments

Comments
 (0)