From 4fe9644dc3533e4517f980645957c6fc9408c6f6 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 6 Jun 2013 02:22:29 +0000 Subject: [PATCH] Don't create a StringRef from a temporary string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183372 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDeclObjC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index b2387d3c7e..21d66d0497 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/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 && -- 2.40.0