File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3206,7 +3206,9 @@ namespace {
3206
3206
// instead of checking if they come from the `std` module.
3207
3207
if (!d->getDeclName ().isIdentifier ())
3208
3208
return false ;
3209
- return d->getName () == " abs" || d->getName () == " div" ;
3209
+ return d->getName () == " abs" || d->getName () == " div" ||
3210
+ d->getName () == " strstr" || d->getName () == " sin" ||
3211
+ d->getName () == " cos" ;
3210
3212
};
3211
3213
if (decl->getOwningModule () &&
3212
3214
(decl->getOwningModule ()
@@ -3217,7 +3219,8 @@ namespace {
3217
3219
Impl.getClangPreprocessor ().getSourceManager ().getFilename (
3218
3220
decl->getLocation ());
3219
3221
if (filename.endswith (" cmath" ) || filename.endswith (" math.h" ) ||
3220
- filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" )) {
3222
+ filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" ) ||
3223
+ filename.endswith (" string.h" )) {
3221
3224
return nullptr ;
3222
3225
}
3223
3226
}
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ func test() {
20
20
21
21
let _ = CxxStdlib . abs ( x) // expected-error {{module 'CxxStdlib' has no member named 'abs'}}
22
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'}}
23
24
}
You can’t perform that action at this time.
0 commit comments