Index: lldb/trunk/source/Core/FormatEntity.cpp =================================================================== --- lldb/trunk/source/Core/FormatEntity.cpp +++ lldb/trunk/source/Core/FormatEntity.cpp @@ -2424,10 +2424,10 @@ variable_name = llvm::StringRef(); variable_format = llvm::StringRef(); - const size_t paren_pos = format_str.find_first_of('}'); + const size_t paren_pos = format_str.find('}'); if (paren_pos != llvm::StringRef::npos) { - const size_t percent_pos = format_str.find_first_of('%'); + const size_t percent_pos = format_str.find('%'); if (percent_pos < paren_pos) { if (percent_pos > 0) Index: lldb/trunk/source/Host/common/FileSpec.cpp =================================================================== --- lldb/trunk/source/Host/common/FileSpec.cpp +++ lldb/trunk/source/Host/common/FileSpec.cpp @@ -107,7 +107,7 @@ return; llvm::StringRef path_str(path.data(), path.size()); - size_t slash_pos = path_str.find_first_of("/", 1); + size_t slash_pos = path_str.find('/', 1); if (slash_pos == 1 || path.size() == 1) { // A path of ~/ resolves to the current user's home dir Index: lldb/trunk/source/Host/common/ThisThread.cpp =================================================================== --- lldb/trunk/source/Host/common/ThisThread.cpp +++ lldb/trunk/source/Host/common/ThisThread.cpp @@ -37,7 +37,7 @@ { // We're still too long. Since this is a dotted component, use everything after the last // dot, up to a maximum of |length| characters. - std::string::size_type last_dot = truncated_name.find_last_of("."); + std::string::size_type last_dot = truncated_name.rfind('.'); if (last_dot != std::string::npos) begin = last_dot + 1; Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp @@ -230,7 +230,7 @@ if (for_expression && !name.empty()) { - size_t less_than_pos = name.find_first_of('<'); + size_t less_than_pos = name.find('<'); if (less_than_pos != std::string::npos) { Index: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp =================================================================== --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -609,12 +609,12 @@ std::string info((const char *)buffer->GetBytes()); std::vector info_lines; - size_t lpos = info.find_first_of("\n"); + size_t lpos = info.find('\n'); while (lpos != std::string::npos) { info_lines.push_back(info.substr(0, lpos)); info = info.substr(lpos + 1); - lpos = info.find_first_of("\n"); + lpos = info.find('\n'); } size_t offset = 0; while (offset < info_lines.size()) Index: lldb/trunk/source/Utility/UriParser.cpp =================================================================== --- lldb/trunk/source/Utility/UriParser.cpp +++ lldb/trunk/source/Utility/UriParser.cpp @@ -40,7 +40,7 @@ // Extract path. tmp_scheme = uri.substr(0, pos); auto host_pos = pos + strlen(kSchemeSep); - auto path_pos = uri.find_first_of("/", host_pos); + auto path_pos = uri.find('/', host_pos); if (path_pos != std::string::npos) tmp_path = uri.substr(path_pos); else Index: lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp +++ lldb/trunk/tools/lldb-mi/MICmdArgValFile.cpp @@ -142,8 +142,8 @@ if (vrFileNamePath.empty()) return false; - const bool bHavePosSlash = (vrFileNamePath.find_first_of("/") != std::string::npos); - const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != std::string::npos); + const bool bHavePosSlash = (vrFileNamePath.find('/') != std::string::npos); + const bool bHaveBckSlash = (vrFileNamePath.find('\\') != std::string::npos); // Look for --someLongOption size_t nPos = vrFileNamePath.find("--"); @@ -152,13 +152,13 @@ return false; // Look for -f type short parameters - nPos = vrFileNamePath.find_first_of("-"); + nPos = vrFileNamePath.find('-'); const bool bShort = (nPos == 0); if (bShort) return false; // Look for i1 i2 i3.... - nPos = vrFileNamePath.find_first_of("i"); + nPos = vrFileNamePath.find('i'); const bool bFoundI1 = ((nPos == 0) && (::isdigit(vrFileNamePath[1]))); if (bFoundI1) return false; Index: lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp +++ lldb/trunk/tools/lldb-mi/MICmdArgValOptionLong.cpp @@ -249,8 +249,8 @@ bool CMICmdArgValOptionLong::IsArgLongOption(const CMIUtilString &vrTxt) const { - const bool bHavePosSlash = (vrTxt.find_first_of("/") != std::string::npos); - const bool bHaveBckSlash = (vrTxt.find_first_of("\\") != std::string::npos); + const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos); + const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos); if (bHavePosSlash || bHaveBckSlash) return false; Index: lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp +++ lldb/trunk/tools/lldb-mi/MICmdArgValString.cpp @@ -220,8 +220,8 @@ if (!m_bHandleDirPaths) { // Look for directory file paths, if found reject - const bool bHavePosSlash = (vrTxt.find_first_of("/") != std::string::npos); - const bool bHaveBckSlash = (vrTxt.find_first_of("\\") != std::string::npos); + const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos); + const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos); if (bHavePosSlash || bHaveBckSlash) return false; } Index: lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp +++ lldb/trunk/tools/lldb-mi/MICmdArgValThreadGrp.cpp @@ -117,7 +117,7 @@ CMICmdArgValThreadGrp::IsArgThreadGrp(const CMIUtilString &vrTxt) const { // Look for i1 i2 i3.... - const MIint nPos = vrTxt.find_first_of("i"); + const MIint nPos = vrTxt.find('i'); if (nPos != 0) return false; Index: lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp =================================================================== --- lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp +++ lldb/trunk/tools/lldb-mi/MICmdCmdBreak.cpp @@ -118,10 +118,10 @@ { // Full paths in windows can have ':' after a drive letter, so we // search backwards, taking care to skip C++ namespace tokens '::'. - size_t n = x.find_last_of(':'); + size_t n = x.rfind(':'); while (n != std::string::npos && n > 1 && x[n-1] == ':') { - n = x.find_last_of(':', n - 2); + n = x.rfind(':', n - 2); } return n; }