forked from OSchip/llvm-project
Raw string followup. Pass a couple StringRefs by value.
llvm-svn: 137301
This commit is contained in:
parent
0c02e4eaea
commit
5265bb211d
|
@ -197,7 +197,7 @@ public:
|
|||
|
||||
private:
|
||||
void init(const Token *StringToks, unsigned NumStringToks);
|
||||
void CopyStringFragment(const StringRef &Fragment);
|
||||
void CopyStringFragment(StringRef Fragment);
|
||||
};
|
||||
|
||||
} // end namespace clang
|
||||
|
|
|
@ -1119,7 +1119,7 @@ void StringLiteralParser::init(const Token *StringToks, unsigned NumStringToks){
|
|||
|
||||
/// copyStringFragment - This function copies from Start to End into ResultPtr.
|
||||
/// Performs widening for multi-byte characters.
|
||||
void StringLiteralParser::CopyStringFragment(const StringRef &Fragment) {
|
||||
void StringLiteralParser::CopyStringFragment(StringRef Fragment) {
|
||||
// Copy the character span over.
|
||||
if (CharByteWidth == 1) {
|
||||
memcpy(ResultPtr, Fragment.data(), Fragment.size());
|
||||
|
|
|
@ -19,7 +19,7 @@ using namespace clang;
|
|||
|
||||
/// IsStringPrefix - Return true if Str is a string prefix.
|
||||
/// 'L', 'u', 'U', or 'u8'. Including raw versions.
|
||||
static bool IsStringPrefix(const StringRef &Str, bool CPlusPlus0x) {
|
||||
static bool IsStringPrefix(StringRef Str, bool CPlusPlus0x) {
|
||||
|
||||
if (Str[0] == 'L' ||
|
||||
(CPlusPlus0x && (Str[0] == 'u' || Str[0] == 'U' || Str[0] == 'R'))) {
|
||||
|
|
Loading…
Reference in New Issue