diff options
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index 25e320df51..acb5b8a797 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -1171,6 +1171,10 @@ Slash: // Found backslash<whitespace><newline>. Parse the char after it. Size += EscapedNewLineSize; Ptr += EscapedNewLineSize; + + if (Ptr[0] == '\0') + return '\\'; + // Use slow version to accumulate a correct size field. return getCharAndSizeSlow(Ptr, Size, Tok); } @@ -1222,6 +1226,9 @@ Slash: Size += EscapedNewLineSize; Ptr += EscapedNewLineSize; + if (Ptr[0] == '\0') + return '\\'; + // Use slow version to accumulate a correct size field. return getCharAndSizeSlowNoWarn(Ptr, Size, Features); } |