summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2013-06-06 02:22:29 +0000
committerRichard Trieu <rtrieu@google.com>2013-06-06 02:22:29 +0000
commitea8d370d2a422b0d017916d0507484be1d8808ba (patch)
tree1c53887b3b3cf69e2f9087c5b799490eba044f8b /clang/lib
parent4a8f079371bbfcc9fba740fa47494f0b2cc83432 (diff)
downloadbcm5719-llvm-ea8d370d2a422b0d017916d0507484be1d8808ba.tar.gz
bcm5719-llvm-ea8d370d2a422b0d017916d0507484be1d8808ba.zip
Don't create a StringRef from a temporary string.
llvm-svn: 183372
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index b2387d3c7e1..21d66d04976 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -2277,7 +2277,7 @@ HelperSelectorsForTypoCorrection(
StringRef Typo, const ObjCMethodDecl * Method) {
const unsigned MaxEditDistance = 1;
unsigned BestEditDistance = MaxEditDistance + 1;
- StringRef MethodName = Method->getSelector().getAsString();
+ std::string MethodName = Method->getSelector().getAsString();
unsigned MinPossibleEditDistance = abs((int)MethodName.size() - (int)Typo.size());
if (MinPossibleEditDistance > 0 &&
OpenPOWER on IntegriCloud