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 @@ -3211,16 +3211,20 @@ namespace {
3211
3211
d->getName () == " cos" || d->getName () == " exit" ;
3212
3212
};
3213
3213
if (decl->getOwningModule () &&
3214
- decl->getOwningModule ()
3215
- ->getTopLevelModule ()
3216
- ->getFullModuleName () == " std" &&
3217
- isAlternativeCStdlibFunctionFromTextualHeader (decl)) {
3214
+ (decl->getOwningModule ()
3215
+ ->getTopLevelModule ()
3216
+ ->getFullModuleName () == " std" ||
3217
+ decl->getOwningModule ()
3218
+ ->getTopLevelModule ()
3219
+ ->getFullModuleName () == " _SwiftConcurrencyShims" )) {
3220
+ if (isAlternativeCStdlibFunctionFromTextualHeader (decl)) {
3221
+ return nullptr ;
3222
+ }
3218
3223
auto filename =
3219
3224
Impl.getClangPreprocessor ().getSourceManager ().getFilename (
3220
3225
decl->getLocation ());
3221
3226
if (filename.endswith (" cmath" ) || filename.endswith (" math.h" ) ||
3222
- filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" ) ||
3223
- filename.endswith (" string.h" )) {
3227
+ filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" )) {
3224
3228
return nullptr ;
3225
3229
}
3226
3230
}
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