Skip to content

SWIFT_NAME annotation has no effect on function templates #83144

@maddyadams

Description

@maddyadams

Description

No response

Reproduction

#include <swift/bridging>

template <typename T>
void foo(T x) SWIFT_NAME(bar(_:)) {}
bar(5 as CInt) // Error: Cannot find 'bar' in scope

Expected behavior

I expected the code to compile

Environment

swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0

Additional information

rdar://124031460

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions