diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
commit | d6aff018d446f22be4e4e0277080ebfa5b157288 (patch) | |
tree | 64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Lex/Lexer.cpp | |
parent | b897c8660c4ff7037dde81b9645737bc1c992abe (diff) |
Notes
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r-- | lib/Lex/Lexer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp index c2ffd6d4339e6..81ea606f0d9fc 100644 --- a/lib/Lex/Lexer.cpp +++ b/lib/Lex/Lexer.cpp @@ -473,13 +473,14 @@ Slash: // Common case, backslash-char where the char is not whitespace. if (!isWhitespace(Ptr[0])) return '\\'; - // See if we have optional whitespace characters followed by a newline. + // See if we have optional whitespace characters between the slash and + // newline. if (unsigned EscapedNewLineSize = getEscapedNewLineSize(Ptr)) { // Remember that this token needs to be cleaned. if (Tok) Tok->setFlag(Token::NeedsCleaning); // Warn if there was whitespace between the backslash and newline. - if (EscapedNewLineSize != 1 && Tok && !isLexingRawMode()) + if (Ptr[0] != '\n' && Ptr[0] != '\r' && Tok && !isLexingRawMode()) Diag(Ptr, diag::backslash_newline_space); // Found backslash<whitespace><newline>. Parse the char after it. |