File tree Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -3208,16 +3208,20 @@ namespace {
3208
3208
d->getName () == " cos" || d->getName () == " exit" ;
3209
3209
};
3210
3210
if (decl->getOwningModule () &&
3211
- decl->getOwningModule ()
3212
- ->getTopLevelModule ()
3213
- ->getFullModuleName () == " std" &&
3214
- isAlternativeCStdlibFunctionFromTextualHeader (decl)) {
3211
+ (decl->getOwningModule ()
3212
+ ->getTopLevelModule ()
3213
+ ->getFullModuleName () == " std" ||
3214
+ decl->getOwningModule ()
3215
+ ->getTopLevelModule ()
3216
+ ->getFullModuleName () == " _SwiftConcurrencyShims" )) {
3217
+ if (isAlternativeCStdlibFunctionFromTextualHeader (decl)) {
3218
+ return nullptr ;
3219
+ }
3215
3220
auto filename =
3216
3221
Impl.getClangPreprocessor ().getSourceManager ().getFilename (
3217
3222
decl->getLocation ());
3218
3223
if (filename.endswith (" cmath" ) || filename.endswith (" math.h" ) ||
3219
- filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" ) ||
3220
- filename.endswith (" string.h" )) {
3224
+ filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" )) {
3221
3225
return nullptr ;
3222
3226
}
3223
3227
}
Original file line number Diff line number Diff line change @@ -6,21 +6,13 @@ import CxxStdlib
6
6
7
7
func test( ) {
8
8
let x : Float = 1.0
9
- let y : Double = 2.0
9
+ let y : Float = 2.0
10
10
11
- // Note: we dispatch `pow(Float,Double)`
12
- // to ensure we don't pick up the
13
- // C++ stdlib `pow` function template.
14
- // The `pow` function is still reexported
15
- // from Darwin via CxxStdlib, so there are
16
- // matching overloads that can be found still.
17
- // Note: the error is different on Glibc instead
18
- // of Darwin, so do not check the exact error.
19
- let _ = CxxStdlib . pow ( x, y) // expected-error {{}}
11
+ let _ = pow ( x, y)
20
12
21
- let _ = CxxStdlib . abs ( x) // expected-error {{module 'CxxStdlib' has no member named 'abs'}}
22
- let _ = CxxStdlib . div ( x ) // expected-error {{module 'CxxStdlib' has no member named 'div'}}
23
- let _ = CxxStdlib . strstr ( " a " , " aaa " ) // expected-error {{module 'CxxStdlib' has no member named 'strstr'}}
13
+ let _ = abs ( x)
14
+ let _ = div ( 42 , 2 )
15
+ let _ = strstr ( " a " , " aaa " )
24
16
25
17
exit ( 0 )
26
18
}
You can’t perform that action at this time.
0 commit comments