[cfe-commits] r112979 - /cfe/trunk/lib/Parse/ParseObjc.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Sep 3 11:01:09 PDT 2010
Author: fjahanian
Date: Fri Sep 3 13:01:09 2010
New Revision: 112979
URL: http://llvm.org/viewvc/llvm-project?rev=112979&view=rev
Log:
Use std::string instead of llvm::StringRef to avoid dangling ref.
Per Chris's comment.
Modified:
cfe/trunk/lib/Parse/ParseObjc.cpp
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=112979&r1=112978&r2=112979&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Fri Sep 3 13:01:09 2010
@@ -599,7 +599,7 @@
case tok::pipeequal:
case tok::caret:
case tok::caretequal: {
- llvm::StringRef ThisTok = PP.getSpelling(Tok);
+ std::string ThisTok(PP.getSpelling(Tok));
if (isalpha(ThisTok[0])) {
IdentifierInfo *II = &PP.getIdentifierTable().get(ThisTok.data());
Tok.setKind(tok::identifier);
More information about the cfe-commits
mailing list