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 @@ -3203,7 +3203,9 @@ namespace {
3203
3203
// instead of checking if they come from the `std` module.
3204
3204
if (!d->getDeclName ().isIdentifier ())
3205
3205
return false ;
3206
- return d->getName () == " abs" || d->getName () == " div" ;
3206
+ return d->getName () == " abs" || d->getName () == " div" ||
3207
+ d->getName () == " strstr" || d->getName () == " sin" ||
3208
+ d->getName () == " cos" ;
3207
3209
};
3208
3210
if (decl->getOwningModule () &&
3209
3211
(decl->getOwningModule ()
@@ -3214,7 +3216,8 @@ namespace {
3214
3216
Impl.getClangPreprocessor ().getSourceManager ().getFilename (
3215
3217
decl->getLocation ());
3216
3218
if (filename.endswith (" cmath" ) || filename.endswith (" math.h" ) ||
3217
- filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" )) {
3219
+ filename.endswith (" stdlib.h" ) || filename.endswith (" cstdlib" ) ||
3220
+ filename.endswith (" string.h" )) {
3218
3221
return nullptr ;
3219
3222
}
3220
3223
}
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