aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2017-01-28 13:36:34 +0000
committerSylvestre Ledru <sylvestre@debian.org>2017-01-28 13:36:34 +0000
commitd8650cde5d1f872e1418aacf16cc6b8ec954e29a (patch)
tree2a17e355caf071368b927f9e10313bb745cc7e0c /clang/lib/Frontend/Rewrite/RewriteObjC.cpp
parent[BlockGenerator] Comment corretions for r293374 [NFC] (diff)
downloadllvm-project-d8650cde5d1f872e1418aacf16cc6b8ec954e29a.tar.gz
llvm-project-d8650cde5d1f872e1418aacf16cc6b8ec954e29a.tar.bz2
llvm-project-d8650cde5d1f872e1418aacf16cc6b8ec954e29a.zip
Pass a char instead of a string to the find function. clang-tidy: performance-faster-string-find
llvm-svn: 293379
Diffstat (limited to 'clang/lib/Frontend/Rewrite/RewriteObjC.cpp')
-rw-r--r--clang/lib/Frontend/Rewrite/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
index e842e592cbbe..934d6aa34aa1 100644
--- a/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
+++ b/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
@@ -3629,7 +3629,7 @@ static void BuildUniqueMethodName(std::string &Name,
Name += "__" + MD->getSelector().getAsString();
// Convert colons to underscores.
std::string::size_type loc = 0;
- while ((loc = Name.find(":", loc)) != std::string::npos)
+ while ((loc = Name.find(':', loc)) != std::string::npos)
Name.replace(loc, 1, "_");
}