forked from OSchip/llvm-project
Use std::string instead of llvm::StringRef to avoid dangling ref.
Per Chris's comment. llvm-svn: 112979
This commit is contained in:
parent
4583827e13
commit
dadfc1c144
|
@ -599,7 +599,7 @@ IdentifierInfo *Parser::ParseObjCSelectorPiece(SourceLocation &SelectorLoc) {
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue