From 985237ab2d3070edfc91c8d5c41596ec14362cdf Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 28 Jul 2022 17:05:52 +0200 Subject: [PATCH] Swift: small dispatcher fixes File extraction was not using named trap keys, and `emitDebugInfo` was using `std::forward` when it should not. --- swift/extractor/infra/SwiftDispatcher.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/extractor/infra/SwiftDispatcher.h b/swift/extractor/infra/SwiftDispatcher.h index 60d20273655..d564673c976 100644 --- a/swift/extractor/infra/SwiftDispatcher.h +++ b/swift/extractor/infra/SwiftDispatcher.h @@ -215,7 +215,7 @@ class SwiftDispatcher { template void emitDebugInfo(const Args&... args) { - trap.debug(std::forward(args)...); + trap.debug(args...); } // In order to not emit duplicated entries for declarations, we restrict emission to only @@ -315,7 +315,7 @@ class SwiftDispatcher { virtual void visit(swift::TypeBase* type) = 0; void visit(const FilePath& file) { - auto entry = createEntry(file); + auto entry = createEntry(file, file.path); entry.name = file.path; emit(entry); }