mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Explanation: Some functions are implemented both in libc and libc++. Clang uses the enable_if attribute to resolve otherwise ambiguous functions calls. This PR makes the name lookup aware of this attribute. Issue: rdar://152192945 Risk: Low, only C/C++ APIs with enable_if attributes are affected. Testing: Regression test added. Original PR: #82019 Reviewer: @hnrklssn
14 lines
317 B
Swift
14 lines
317 B
Swift
// RUN: %target-swift-frontend -cxx-interoperability-mode=default -typecheck -verify -I %S/Inputs %s
|
|
|
|
// REQUIRES: objc_interop
|
|
// REQUIRES: VENDOR=apple
|
|
|
|
import Darwin
|
|
|
|
func test_memchr() {
|
|
var src = "hello"
|
|
var _ = src.withUTF8 { srcBuf in
|
|
Darwin.memchr(srcBuf.baseAddress!, 137, src.count)
|
|
}
|
|
}
|