mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace usages of StringRef.find(Key) != StringRef::npos to StringRef.contains(Key)
This commit is contained in:
@@ -2291,8 +2291,7 @@ int swift::ide::api::findDeclUsr(StringRef dumpPath, CheckerOptions Opts) {
|
||||
FinderByLocation(StringRef Location): Location(Location) {}
|
||||
void visit(SDKNode* Node) override {
|
||||
if (auto *D = dyn_cast<SDKNodeDecl>(Node)) {
|
||||
if (D->getLocation().find(Location) != StringRef::npos &&
|
||||
!D->getUsr().empty()) {
|
||||
if (D->getLocation().contains(Location) && !D->getUsr().empty()) {
|
||||
llvm::outs() << D->getFullyQualifiedName() << ": " << D->getUsr() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user